Last post Jan 09, 2018 07:14 AM by AngelinaJolie
Jan 07, 2018 03:05 PM|socamb|LINK
I am trying to deploy an asp.net MVC site to a remote IIS Server. The deployment work fine in Visual Studio but I want to automate it.
I am using the following MSDeploy Command:
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package="SportsStore.WebUI.csproj.zip" -dest:iisApp="Default Web Site/SSBuild",ComputerName="http://r2anet01.eastus.cloudapp.azure.com/MSDEPLOYAGENTSERVICE",UserName='Scott',Password='?????',AuthType='Basic'
MS deploy returns the following error:
Error Code: ERROR_USER_NOT_ADMIN
More Information: Connected to 'r2anet01.eastus.cloudapp.azure.com' using the Web Deployment Agent Service, but could not authorize. Make sure you are an administrator on 'r2anet01.eastus.cloudapp.azure.com'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.
I am using the same username/password in MSDeploy that I use in Visual Studio.
Any help would be appreciated.
Jan 09, 2018 07:14 AM|AngelinaJolie|LINK
Sir, I found a solution, please have a try:
If you configure delegation to "Allow administrators to bypass rules" and msdeploy command succeeds, then you are going through WMSvc and it is letting you through. Otherwise, from the response it seems that WMSvc is rejecting you and you are falling back
to Web Deloy agent.
Set/add the following reg value to WMSvc reg key:
reg add HKLM\Software\Microsoft\WebManagement\Server /v WindowsAuthenticationEnabled /t REG_DWORD /d 1
net stop wmsvc & net start wmsvc
Similar thread :
and if still not working, I suggest that you could ask help from https://forums.iis.net/1144.aspx/1?Web+Deployment+Tool+MS+Deploy+
Good Luck :)
With regards, Angelina Jolie