Azure / App-Service-Migration-Assistant

Azure Websites Migration Assistant for Windows is a tool that allows customers to move their existing sites hosted on IIS servers into the cloud on Azure App Service. For more information check out https://appmigration.microsoft.com .
https://appmigration.microsoft.com
MIT License
74 stars 60 forks source link

ConfigErrorCheck received during assessment not giving useful information #81

Open bguptaNavi opened 1 year ago

bguptaNavi commented 1 year ago

We ran Azure migration assessment tool on-prem and found the following error for two of our websites. The web.cofigs are very small and straightforward. Don't see anything else standing out. Not sure what the error is.

'Details': [
  {
    'CheckPassed': false,
    'CheckName': 'ConfigErrorCheck',
    'DisplayMessage': 'The following configuration errors were found: HRESULT=8007000D, Action=parsing_configuration_file, SectionSchemaName=, AttributeName=, Message=The data is invalid. (Exception from HRESULT: 0x8007000D)\\r\\n',
    'Status': 'Block',
    'DisplayTitle': 'Configuration Errors',
    'CheckDescription': 'Checks for errors in the IIS configuration',
    'MoreInfoLink': 'https://go.microsoft.com/fwlink/?linkid=2084726',
    'logFriendlyMessage': 'The following configuration errors were found: HRESULT=8007000D, Action=parsing_configuration_file, SectionSchemaName=, AttributeName=, Message=?\\u003CException:\\u003CException0000\\u003E\\u003E'
  }
]

UTC Timestamp: Fri, 05 May 2023 18:09:09 GMT

OS Version: Windows Server 2019

web.config

<?xml version="1.0" encoding="utf-8"?>

krolson commented 1 year ago

Hi @bguptaNavi , If the configs are small and straightforward (and have NO sensitive information like secrets) would you be willing to share a sample for one of the sites in for trying to give additional suggestions/try to reproduce on our end? Please also double check if there are other web.configs within the site content that may be the cause of the error (web.configs could be in any directory in the site) - if you were to change the root web.config file name to something else and rerun the assessment and it still has this error, that would be an indication that the issue is coming from a web.config at another level.

This error code is coming directly from Microsoft.Web.Administration when we try to load and read the configuration, so this is a generic config error. Often this is due to issues like URL Rewrite module config being used while it's not an installed feature on the server.

Generic page about this error: https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/health-diagnostic-performance/http-error-500-19-webpage#hresult-code-0x8007000d

Other page about this error where some other niche reasons it popped up are noted: https://techcommunity.microsoft.com/t5/iis-support-blog/troubleshooting-http-500-19-errors-in-iis-7/ba-p/347247

bguptaNavi commented 1 year ago

There are two configs for the site. I have attached both of them to this email. Let me know if this helps.

@.***http://navihealth.us/ Bhawna Gupta Application Architect C: 615.714.1739

naviHealth is Guiding the Wayhttps://www.navihealth.com/about-navihealth/company-overview/ News, insights and analysis from the experts transforming health care | naviHealth Essential Insightshttp://www.navihealth.com/NEI

From: krolson @.> Sent: Tuesday, June 13, 2023 11:12 AM To: Azure/App-Service-Migration-Assistant @.> Cc: Bhawna Gupta @.>; Mention @.> Subject: Re: [Azure/App-Service-Migration-Assistant] ConfigErrorCheck received during assessment not giving useful information (Issue #81)

This is an EXTERNAL EMAIL. DO NOT open attachments or click links from unknown senders; if suspicious, click the “Report Phishing” button.

Hi @bguptaNavihttps://github.com/bguptaNavi , If the configs are small and straightforward (and have NO sensitive information like secrets) would you be willing to share a sample for one of the sites in for trying to give additional suggestions/try to reproduce on our end? Please also double check if there are other web.configs within the site content that may be the cause of the error (web.configs could be in any directory in the site) - if you were to change the root web.config file name to something else and rerun the assessment and it still has this error, that would be an indication that the issue is coming from a web.config at another level.

This error code is coming directly from Microsoft.Web.Administration when we try to load and read the configuration, so this is a generic config error. Often this is due to issues like URL Rewrite module config being used while it's not an installed feature on the server.

Generic page about this error: https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/health-diagnostic-performance/http-error-500-19-webpage#hresult-code-0x8007000d

Other page about this error where some other niche reasons it popped up are noted: https://techcommunity.microsoft.com/t5/iis-support-blog/troubleshooting-http-500-19-errors-in-iis-7/ba-p/347247

— Reply to this email directly, view it on GitHubhttps://github.com/Azure/App-Service-Migration-Assistant/issues/81#issuecomment-1589620777, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAQPJS7SMTPK36D33UQHXEDXLCGM5ANCNFSM6AAAAAAZD3G5N4. You are receiving this because you were mentioned.Message ID: @.**@.>>

This email, including attachments, may contain information that is privileged, confidential or is exempt from disclosure under applicable law (including, but not limited to, protected health information). It is not intended for transmission to, or receipt by, any unauthorized persons. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you believe this email was sent to you in error, do not read it. Please notify the sender immediately informing them of the error and delete all copies and attachments of the message from your system. Thank you.

krolson commented 1 year ago

Hi @bguptaNavi - I'm afraid I am unable to see how to access the email attachments you referenced - could you please try sending the email directly to appmigratetalk@microsoft.com ?

bguptaNavi commented 1 year ago

Just sent it.

@.***http://navihealth.us/ Bhawna Gupta Application Architect C: 615.714.1739

naviHealth is Guiding the Wayhttps://www.navihealth.com/about-navihealth/company-overview/ News, insights and analysis from the experts transforming health care | naviHealth Essential Insightshttp://www.navihealth.com/NEI

From: krolson @.> Sent: Tuesday, June 13, 2023 5:03 PM To: Azure/App-Service-Migration-Assistant @.> Cc: Bhawna Gupta @.>; Mention @.> Subject: Re: [Azure/App-Service-Migration-Assistant] ConfigErrorCheck received during assessment not giving useful information (Issue #81)

This is an EXTERNAL EMAIL. DO NOT open attachments or click links from unknown senders; if suspicious, click the “Report Phishing” button.

Hi @bguptaNavihttps://github.com/bguptaNavi - I'm afraid I am unable to see how to access the email attachments you referenced - could you please try sending the email directly to @.**@.> ?

— Reply to this email directly, view it on GitHubhttps://github.com/Azure/App-Service-Migration-Assistant/issues/81#issuecomment-1590082562, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAQPJS3UIT2KURKECBW3FM3XLDPRDANCNFSM6AAAAAAZD3G5N4. You are receiving this because you were mentioned.Message ID: @.**@.>>

This email, including attachments, may contain information that is privileged, confidential or is exempt from disclosure under applicable law (including, but not limited to, protected health information). It is not intended for transmission to, or receipt by, any unauthorized persons. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you believe this email was sent to you in error, do not read it. Please notify the sender immediately informing them of the error and delete all copies and attachments of the message from your system. Thank you.

krolson commented 1 year ago

So I am able to cause this error using the configuration files sent and the Internet Information Services (IIS) Manager UI and a machine with a fairly default IIS install - and if you navigate to the site and the folder where the configuration is located and try opening the "Configuration Editor" you should see this same error, as noted below (and I would expect the site itself to be returning a 500.19 at this config file level as well when browsing it).

Configuration Editor There was an error while performing this operation.

Details: The data is invalid. (Exception from HRESULT: 0x8007000D) OK

Given the web.config contents and I suspect the issue is related to the installed modules on the server, such as aspNetCore module on the server (that it's not installed, wrong version compared to what site web.config is referencing, needs repair, etc.) - similar to in this thread: https://stackoverflow.com/questions/54984884/error-500-19-with-0x8007000d-when-running-asp-net-core-app-in-iis-despite-aspnet, and/or the httpPlatformHandler module.

I'm going to close this issue as it's separate from the migration assistant at this point (i.e. related to generic IIS configuration debugging). If you find that the inetmgr UI does not give the same error when using Configuration Editor for the config that the App Service Migration Assistant is giving an error for, please do let us know (here or in the now existing email thread you have with us).

bguptaNavi commented 1 year ago

This website is running successfully in production for us for last several years and I am able to open the configuration editor in IIS without any issues. I do want to point out that this is a hybrid application with Angular as frontend and .Net as backend. The app pool is set as ‘No Managed Code’. @.***http://navihealth.us/ Bhawna Gupta Application Architect C: 615.714.1739

naviHealth is Guiding the Wayhttps://www.navihealth.com/about-navihealth/company-overview/ News, insights and analysis from the experts transforming health care | naviHealth Essential Insightshttp://www.navihealth.com/NEI

From: krolson @.> Sent: Wednesday, June 14, 2023 6:06 PM To: Azure/App-Service-Migration-Assistant @.> Cc: Bhawna Gupta @.>; Mention @.> Subject: Re: [Azure/App-Service-Migration-Assistant] ConfigErrorCheck received during assessment not giving useful information (Issue #81)

This is an EXTERNAL EMAIL. DO NOT open attachments or click links from unknown senders; if suspicious, click the “Report Phishing” button.

So I am able to cause this error using the configuration files sent and the Internet Information Services (IIS) Manager UI and a machine with a fairly default IIS install - and if you navigate to the site and the folder where the configuration is located and try opening the "Configuration Editor" you should see this same error, as noted below (and I would expect the site itself to be returning a 500.19 at this config file level as well when browsing it).

Configuration Editor There was an error while performing this operation.

Details: The data is invalid. (Exception from HRESULT: 0x8007000D) OK

Given the web.config contents and I suspect the issue is related to the installed modules on the server, such as aspNetCore module on the server (that it's not installed, wrong version compared to what site web.config is referencing, needs repair, etc.) - similar to in this thread: https://stackoverflow.com/questions/54984884/error-500-19-with-0x8007000d-when-running-asp-net-core-app-in-iis-despite-aspnet, and/or the httpPlatformHandler module.

I'm going to close this issue as it's separate from the migration assistant at this point (i.e. related to generic IIS configuration debugging). If you find that the inetmgr UI does not give the same error when using Configuration Editor for the config that the App Service Migration Assistant is giving an error for, please do let us know (here or in the now existing email thread you have with us).

— Reply to this email directly, view it on GitHubhttps://github.com/Azure/App-Service-Migration-Assistant/issues/81#issuecomment-1592106295, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAQPJS4AFAJKBED6QLIERDTXLI7WJANCNFSM6AAAAAAZD3G5N4. You are receiving this because you were mentioned.Message ID: @.**@.>>

This email, including attachments, may contain information that is privileged, confidential or is exempt from disclosure under applicable law (including, but not limited to, protected health information). It is not intended for transmission to, or receipt by, any unauthorized persons. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you believe this email was sent to you in error, do not read it. Please notify the sender immediately informing them of the error and delete all copies and attachments of the message from your system. Thank you.

krolson commented 1 year ago

Hi @bguptaNavi - thanks for those details. I wonder if this has to do with some quirk of the App Service Migration Assistant being "fully packaged" and not relying on any resources on the machine (such that it's version of Microsoft.Web.Administration (MWA) may be slightly different than the version on the server and it's resulting in a behavior difference for this particular configuration pattern). One thing to try here both as a diagnostic and a potential workaround is using the PowerShell scripts Get-SiteReadiness script to see if it gives the same config error result or not. The PowerShell scripts directly use the version of MWA that's already on the server, so it would eliminate this as a potential source of the behavior mismatch between inetmgr and the Migration Assistant.

Please try this and let us know how it goes. If it works, using the scripts is a workaround option to using the Migration Assistant GUI - and either way it would be useful to us to know the specific Windows version of the server (such as in Settings under "About"/"System Properties" the "Windows specifications" information).

bguptaNavi commented 1 year ago

I’ll try this option. Also wanted to let you know that we were able to take the application and deploy to cloud and it loads up fine in browser.

@.***http://navihealth.us/ Bhawna Gupta Application Architect C: 615.714.1739

naviHealth is Guiding the Wayhttps://www.navihealth.com/about-navihealth/company-overview/ News, insights and analysis from the experts transforming health care | naviHealth Essential Insightshttp://www.navihealth.com/NEI

From: krolson @.> Sent: Thursday, June 15, 2023 11:34 AM To: Azure/App-Service-Migration-Assistant @.> Cc: Bhawna Gupta @.>; Mention @.> Subject: Re: [Azure/App-Service-Migration-Assistant] ConfigErrorCheck received during assessment not giving useful information (Issue #81)

This is an EXTERNAL EMAIL. DO NOT open attachments or click links from unknown senders; if suspicious, click the “Report Phishing” button.

Hi @bguptaNavihttps://github.com/bguptaNavi - thanks for those details. I wonder if this has to do with some quirk of the App Service Migration Assistant being "fully packaged" and not relying on any resources on the machine (such that it's version of Microsoft.Web.Administration (MWA) may be slightly different than the version on the server and it's resulting in a behavior difference for this particular configuration pattern). One thing to try here both as a diagnostic and a potential workaround is using the PowerShell scripts Get-SiteReadiness script to see if it gives the same config error result or not. The PowerShell scripts directly use the version of MWA that's already on the server, so it would eliminate this as a potential source of the behavior mismatch between inetmgr and the Migration Assistant.

Please try this and let us know how it goes. If it works, using the scripts is a workaround option to using the Migration Assistant GUI - and either way it would be useful to us to know the specific Windows version of the server (such as in Settings under "About"/"System Properties" the "Windows specifications" information).

— Reply to this email directly, view it on GitHubhttps://github.com/Azure/App-Service-Migration-Assistant/issues/81#issuecomment-1593386375, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAQPJS5HLJPP5FNMBHZ4A7LXLM2OTANCNFSM6AAAAAAZD3G5N4. You are receiving this because you were mentioned.Message ID: @.**@.>>

This email, including attachments, may contain information that is privileged, confidential or is exempt from disclosure under applicable law (including, but not limited to, protected health information). It is not intended for transmission to, or receipt by, any unauthorized persons. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you believe this email was sent to you in error, do not read it. Please notify the sender immediately informing them of the error and delete all copies and attachments of the message from your system. Thank you.