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

Azure App Service Migration Assistance not opening as an administrator #60

Closed rrk1990 closed 1 year ago

rrk1990 commented 2 years ago

when the dotnet assistance app is installed, Run as administrator is not worker but getting an error This application requires administrator privileges to read IIS configuration. Please re-launch the application as Administrator, I have multiple installs but not able to open the app as an administrator.

After multiple try also the app is not opening with the elevated access.

Please provide the following:

Provide the steps required to reproduce the problem:

  1. Step A Downloading the asp doetnet app assistance from https://azure.microsoft.com/en-us/services/app-service/migration-assistant/
  2. Step B Open the installed app with an elevated access, will get an error This application requires administrator privileges to read IIS configuration. Please re-launch the application as Administrator but even after many attempts also it will not open with elevated access.

Provide a description of the expected behavior.

After Step A, when app is launched as an administrator it should get launched with elevated access and it should access the IIS.

Provide a description of the actual behavior observed.

The current installed app doesn't open with elevated access and not able to access the IIS, in fact it throw an error.

Provide a description of any known workarounds.

Tried to install the app with elevated cmd and open the app from there.

rrk1990 commented 2 years ago

AppAssistance AppAssistanceConsoleError

krolson commented 2 years ago

Hi @rrk1990 - thank you for letting us know about this, I'm sorry you've run into this issue.

Couple questions to try to figure out what's going on or to help us repro this as well - is your logged in user part of the Administrators group or a non-administrator account? The migration assistant will attempt to start elevated even without specially starting as admin, but clearly this isn't working here.

When you say you have tried to start as administrator from elevated command prompt is that starting the AppServiceMigrationAssistant.exe from an elevated command prompt or something else? Does something different happen if you navigate to the folder where the .exe is located (will be location in a location like this, but with your user name: "C:\Users\\AppData\Local\Programs\azure-appService-migrationAssistant\AppServiceMigrationAssistant.exe"), right-click the .exe and choose "Run as administrator" from there...? Or if you already tried this, could you please tell me what happens when you run below from the elevated command prompt that isn't working to launch the .exe:

cd C:\Users\<USERNAME>\AppData\Local\Programs\azure-appService-migrationAssistant\iisConfigAssistant
iisConfigAssistant.exe GetSiteList
chungyou commented 2 years ago

We are facing the same issue.

image

krolson commented 2 years ago

Thank you, @chungyou for letting us know you're seeing this, too.

It looks like the underlying iisConfigAssistant.exe is able to get the site list when run directly in the elevated command prompt. I'm assuming if you then start the ..\AppServiceMigrationAssistant.exe from the same prompt it gives the non-admin message, is that right?

Does it behave differently if you open the folder location (C:\Users\AppData\Local\Programs\azure-appService-migrationAssistant) and right-click Run as Administrator on AppServiceMigrationAssistant.exe? Is your current logged-in user a member of the Administrator's group? Are you aware of any any protection programs running on the machine or policies that might limit the launch of Administrator-level exes? (Specifically the Migration Assistant works by calling to the iisConfigAssistant.exe, and it is the iisConfigAssistant which requires the administrator permission to read the IIS configuration, so even if you launch the electron UI as admin, if a system setting blocks the underlying .exe from running as administrator you might see this type of error.)

Sammy1032 commented 2 years ago

Hi @krolson

We met the same issue. I had tried right-click Run as Administrator on AppServiceMigrationAssistant.exe, also check the login account is in Administrator Group. There should no other limit to launch Administrator-level exes.

krolson commented 1 year ago

Closing due to lack of activity over last 90 days. If you are still experiencing this issue please open a new issue! The PowerShell scripts (https://github.com/Azure/App-Service-Migration-Assistant/wiki/PowerShell-Scripts) could be another alternative for migration if the Migration Assistant is not working for you.