【发布时间】:2015-01-22 14:38:11
【问题描述】:
我有一个 Web 项目,我希望它使用 MSDeploy 将其部署到暂存环境。
从 Visual Studio 发布,使用以下设置一切正常: 服务器:mystaging.com
- 站点名称:
project-staging(我删除了默认网站,这是我暂存 IIS 中现在唯一的站点) - 用户名:管理员
- 密码:SomePasswordHere
- 目的地:mystaging.com
(mystaging.com 是一个公共网站——显然不是这个)
部署在 Visual Studio 中完美运行。
从 MSDeploy 中尝试相同的操作,例如:
-verb:sync
-allowUntrusted
-source:contentPath="C:\Users\...\obj\Staging\Package\PackageTmp"
-dest:contentpath='C:\inetpub\wwwroot\project-staging'
includeAcls='False',
,ComputerName=https://mystaging.com:8172/msdeploy.axd?site=project-staging
,UserName=Administrator
,Password=SomePasswordHere
,AuthType=Basic
失败:
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("mystaging.com") 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.
Process exited with code -1
我已经尝试了所有方法(提升权限、创建其他用户等),但没有任何效果。
有人可以给我一个提示,告诉我如何解决这个问题并让部署也从 MSDeploy 工作吗?
【问题讨论】:
标签: asp.net visual-studio deployment teamcity msdeploy