我在尝试远程部署时收到 401 错误。
来自服务器的事件日志 -
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
我正在使用以下脚本来部署
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
如果我使用管理员用户,它工作正常。但对于非管理员和 IIS 用户来说,它会失败。
我尝试按照本文设置权限和委托规则-https://blogs.iis.net/krolson/using-iis-manager-accounts-for-web-deployment-tool-msdeploy-delegation https://blogs.iis.net/krolson/using-iis-manager-accounts-for-web-deployment-tool-msdeploy-delegation
似乎什么都不起作用。
我已经为这个错误苦苦挣扎了几个小时,并找到了解决方案。在 MsDeploy.exe 命令行中,您必须在“wmsvc”参数中指定站点名称。例如:
"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'
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)