I am getting 401 error when trying to deploy remotely. Event log from server -
The following information was included with the event:
IISWMSVC_AUTHORIZATION_SERVER_NOT_ALLOWED
Only Windows Administrators are allowed to connect using a server connection. Other users should use the 'Connect To Site or Application' task to be able to connect.
Process:WMSvc
User=deployer
I am using following script to deploy
msdeploy.exe -verb:sync -source:package=c:\Jenkins\workspace\Myproject.zip - dest:auto,wmsvc=[server_ip],usernverame=iis_deployer,password=iis_deployer,authType=basic -setparam:name='IIS Web Application Name',value='Default Web Site\myproject\master' -allowUntrusted
It works fine if I use the admin user. But it fails for non-admin and IIS users.
I have tried to set the permission and delegated rules by following this article- https://blogs.iis.net/krolson/using-iis-manager-accounts-for-web-deployment-tool-msdeploy-delegation
Nothing seems to work.
I have been struggling with this error for hours and I found the solution. In the MsDeploy.exe command line you must specify the site name in the "wmsvc" parameter. For instance:
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='d:\temp\xxx.zip' -dest:auto,wmsvc="https://192.168.XXX.XXX:8172/msdeploy.axd?site=Test",userName='usr',password='pwd',includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -AllowUntrusted -retryAttempts=2 -setParam:'IIS Web Application Name'='Test'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With