I have a web project and I would like it to deploy it using MSDeploy to a staging environment.
From Visual Studio publish everything works ok with these settings: Server: mystaging.com
- Site name:
project-staging
(I removed the Default Web Site and this is the only site now in my staging IIS) - Username: Administrator
- Password: SomePasswordHere
- Destination: mystaging.com
(mystaging.com is a public site - obviously not this one)
The deployment works perfectly from Visual Studio.
Trying the same thing from MSDeploy like:
-verb:sync
-allowUntrusted
-source:contentPath="C:\Users\...\obj\Staging\Package\PackageTmp"
-dest:contentpath='C:\inetpub\wwwroot\project-staging'
includeAcls='False',
,ComputerName=https://mystaging.com:8172/msdeploy.axd?site=project-staging
,UserName=Administrator
,Password=SomePasswordHere
,AuthType=Basic
fails with:
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("mystaging.com") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.
Process exited with code -1
I've tried everything (elevating permissions, making other users, etc.) and nothing worked.
Can someone give me a tip on how to fix this issue and having the deploy working from MSDeploy as well?