Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 401 Windows Server 2016上使用非管理员用户和IIS用户的WebDeploy出现未经授权的错误_Asp.net_Iis_Webdeploy - Fatal编程技术网

Asp.net 401 Windows Server 2016上使用非管理员用户和IIS用户的WebDeploy出现未经授权的错误

Asp.net 401 Windows Server 2016上使用非管理员用户和IIS用户的WebDeploy出现未经授权的错误,asp.net,iis,webdeploy,Asp.net,Iis,Webdeploy,尝试远程部署时出现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

尝试远程部署时出现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用户,它会失败

我试图通过遵循本文来设置权限和委托规则-


似乎什么都不管用

我与这个错误斗争了几个小时,我找到了解决办法。在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'