Web Deployment Tool (MS Deploy)
Last post Jan 29, 2013 04:49 PM by spamme1
Jan 25, 2013 10:52 AM|spamme1|LINK
I'm trying to use msdeploy from the command line but I get an 401 unathorized but it works in VS2010, here the configuration:
And here the msdeploy command with parameters:
"C:\Program Files\IIS\Microsoft Web Deploy V3\\msdeploy.exe" -source:package='c:\temp\test\test.zip' -dest:auto,wmsvc='https://TestServer:8172/msdeploy.axd?site=Default+Web+Site/Test',userName='Test',password='Test',includeAcls='False' -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -allowUntrusted -setParamFile:"c:\temp\test\test.SetParameters.xml"
And the error message
Info: Using ID '4e06009a-fa71-4774-bfd8-78b88a2b28ee' for connections to the remote server.
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("TestServer") 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.
From MS Deploy troubleshooting:
The username and password are correct, the "site" exists (Default Web Site/Test) and the user has IIS Manager permission on "Default Web Site".
What is wrong?
Jan 28, 2013 09:06 AM|Catherine Shan - MSFT|LINK
For your issue, you can try to follow the method
jay-dubb provided as follows:
1.) Open iis and select the website that is causing the 401
2.) Open the "Authentication" property under the "IIS" header
3.) Click the "Windows Authentication" item and click "Providers"
4.) Move the NTLM to the top most spot and BAM that fixed it.
For details, please check the link below:
Jan 29, 2013 04:49 PM|spamme1|LINK
Thanks but I don't think that this solution applys to IIS 7 because there isn't a "Providers", perhaps it was something for IIS 6.
The poblem was the site parameter "wmsvc='https://TestServer:8172/msdeploy.axd?site=Default+Web+Site/Test'" which shouldn't add the sub folders:
"wmsvc='https://TestServer:8172/msdeploy.axd?site=Default Web Site'"