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
76 stars 60 forks source link

1.0.0: GETTING CONFIG: Unexpected output for GetSiteAssessmentData #20

Closed RiccardoGMoschetti closed 4 years ago

RiccardoGMoschetti commented 4 years ago

Investigative information

Please provide the following:

Repro steps

Provide the steps required to reproduce the problem:

  1. Log to Windows 2008R2, .Net 4.7.2
  2. Launch against IIS with multiple sites and multiple web apps (>10, >30 web apps total)
  3. Choose a site
  4. Soon after, you receive the error Session 2afa2654-57ff-4d1a-bdc6-009fab2d060c, GETTING CONFIG: Unexpected output for GetSiteAssessmentData, error was: SyntaxError: Unexpected token { in JSON at position 224030)

    Expected behavior

Provide a description of the expected behavior. I should be able to migrate

Actual behavior

I receive an error

Known workarounds

Provide a description of any known workarounds. Not found yet.

krolson commented 4 years ago

Thank you for letting us know about this. This looks like a bug in the way we're generating the site configuration probably related to a specific server-level configuration section/setting on your machine (hence why it fails for all the sites on the server). To help us figure out where this is occurring, could you please run the below command for one of the sites and send us the output anonAssessmentInfo.json file (you could share a pointer to the file or email to me at my username @microsoft.com if you prefer)?

  1. Find out the path for the installation of iisConfigurationHelper.exe: Right-click the AppServiceMigrationTool desktop shortcut and select Properties. Look for the path in the "Start in" value (should be something like: C:\Users\\AppData\Local\Programs\azure-appService-migrationtool).
  2. Open an admin command prompt and go to that location with added "\iisConfigAssistant": C:\Users\\AppData\Local\Programs\azure-appService-migrationtool\iisConfigAssistant
  3. Run below command and send us the output - note that siteName should exactly match how site name appears when you run iisConfigAssistant.exe GetSiteList:

iisConfigAssistant.exe GetSiteAssessmentData "[siteName]" true [pathToMappingFile] > [pathToAnonAssessmentInfoFile]

example: iisConfigAssistant.exe GetSiteAssessmentData "Default Web Site" true C:\TEMP\deleteThisDontShareIt.txt > C:\TEMP\anonAssessmentInfo.json

philipccwong commented 4 years ago

I have the same issue, I tried on two of my servers with different apps

{ "HResult": "80004003", "DisplayMessage": "Object reference not set to an instance of an object.", "TelemetryMessage": "An unhandled exception occurred. HResult=80004003", "StackTrace": " at iisConfigHelper.aspCacheElement.SetAnonymous(Boolean IsAnonymous)\r\n at iisConfigHelper.system_webServer__asp.SetAnonymous(Boolean IsAnonymous)\r\n at iisConfigHelper.IisConfiguration.SetAnonymous(Boolean IsAnonymous)\r\n at iisMigrationHelper.IisMigrationHelper.GetAnonymizerLookupTable()\r\n at iisConfigAssistant.Program.DoGetSiteAssessmentData(String[] args) in D:\a\1\s\src\IisConfigurationHelper\iisConfigAssistant\Program.cs:line 283\r\n at iisConfigAssistant.Program.Main(String[] args) in D:\a\1\s\src\IisConfigurationHelper\iisConfigAssistant\Program.cs:line 48" }

KarolLipnickiLX commented 4 years ago

I'm getting the same error while testing IIS site placed on IIS 7.5 (Windows Server 2008 R2)

C:\Users\Administrator\AppData\Local\Programs\azure-appService-migrationAssistant\iisConfigAssistant>iisConfigAssistant GetSiteAssessmentDat a 'sitename.pl' true X:_default\sitename.pl.txt { "HResult": "80131502", "DisplayMessage": "Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index", "TelemetryMessage": "An unhandled exception occurred. HResult=80131502", "StackTrace": " at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)\r\n at System.Collections.Generic.List`1.get_Item(Int32index)\r\n at iisFrameworkDetector.FrameworkDetector.InitializeFrameworkDetector(IisConfiguration iisConfig)\r\n at iisFrameworkDetector.FrameworkDetector..ctor(IisConfiguration SiteConfiguration)\r\n at iisConfigAssistant.Program.DoGetSiteAssessmentData(String[] args) in D:\a\1\s\src\IisConfigurationHelper\iisConfigAssistant\Program.cs:line 256\r\n at iisConfigAssistant.Program.Main(String[] args) in D:\a\1\s\src\IisConfigurationHelper\iisConfigAssistant\Program.cs:line 48" }

krolson commented 4 years ago

There are changes in latest v1.0.1 Migration Assistant that were made to address the errors seen by @RiccardoGMoschetti and @philipccwong - please try using this latest version and let us know if you are still seeing these issues!

@KarolLipnickiLX : please also try using the latest version. From the error message you posted it looks like there might be a syntax issue in the command of specifying the sitename using different casing than the sitename was listed using the GetSiteList command - unfortunately this command is very case-sensitive. If you still have issues when using the v1.0.1 version then please let us know.

krolson commented 4 years ago

Closing issue - please open a new issue if this is still seen using the v1.0.1 or latest release.