【发布时间】:2017-06-06 16:54:36
【问题描述】:
我正在尝试部署一个网站,最初我有以下命令行
MSBuild.exe PortalWeb.sln
/t:Rebuild
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:MSDeployServiceURL=https://wwwt.mycompany.ru:8172/msdeploy.axd
/p:DeployIISAppPath="Portal/test"
/p:CreatePackageOnPublish=False
/p:MsDeployPublishMethod=WMSVC
/p:AllowUntrustedCertificate=True
/p:UserName=DeployUser
/p:Password=123pwd123
/p:Configuration="Testing Env"
现在我正在使用 TFS 构建服务器并尝试使用生成以下命令的 Web 步骤
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe"
-verb:sync
-source:package='PortalWeb.zip'
-dest:auto,computerName='https://wwwt.mycompany.ru:8172/msdeploy.axd?site=Portal/test',userName='DeployUser',password='123pwd123',authType='WMSVC',includeAcls='False'
-allowUntrusted
此命令失败并出现 401 Unathorized 错误:
2017-06-06T16:00:12.7928227Z ##[error]System.Management.Automation.RemoteException: Error Code: ERROR_USER_UNAUTHORIZED
2017-06-06T16:00:12.7928227Z ##[error]System.Management.Automation.RemoteException: More Information: Connected to the remote computer ("wwwt.mycompany.ru") 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 creden
2017-06-06T16:00:12.7928227Z ##[error]System.Management.Automation.RemoteException: tials represent a user who has permissions to access the site. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
2017-06-06T16:00:12.7928227Z Error: The remote server returned an error: (401) Unauthorized.
2017-06-06T16:00:12.7928227Z Error count: 1.
为什么一个命令使用这些凭据而另一个失败?
【问题讨论】:
标签: authentication msbuild continuous-integration msdeploy