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

Error (401) Unauthorized while executing Invoke-SiteMigration.ps1 during task "Beginning zip deployment" #83

Closed ASchwarz1984 closed 1 year ago

ASchwarz1984 commented 1 year ago

After executing the Invoke-SiteMigration.ps1 I'm receiving error 401 Unauthorized during publishing of zip file.

Investigative information

Please provide the following:

Repro steps

Provide the steps required to reproduce the problem:

Executing script as described here: https://github.com/Azure/App-Service-Migration-Assistant/wiki/PowerShell-Scripts The execution of Invoke-SiteMigration.ps1 leads to an error 401 during zip publishing. All previous steps succeed.

Expected behavior

Provide a description of the expected behavior.

Zip content gets published.

Actual behavior

Provide a description of the actual behavior observed.

Zip content publishing fails

krolson commented 1 year ago

Hi @ASchwarz1984 - I have a first guess for why this is happening, which is that this is due to Basic Authentication being disabled on the site. Could you check if you have it disabled by looking at the site resource in Azure Portal > go to Configuration and General Settings > see what's shown for Basic Authentication (on or off). The PowerShell scripts use basic auth with the publish profile credentials to do the content migration.

ASchwarz1984 commented 1 year ago

Thank you @krolson. I can confirm that Basic Authentication was disabled due to Azure Policy enforcement. I've modified the script to pause after Web App creation to be able to update the web app configuration and allow basic authentication temporarily.