Web部署任务构建失败

时间:2011-08-04 09:38:24

标签: visual-studio-2010 tfs2010

情景:

我成功设置了TFS2010 webdeploy任务以获得解决方案。一切正常,直到部署任务出现问题为止。

解决方案有2个Web项目..这些项目被配置为在构建时部署并将其发布到开发服务器。

有没有人知道构建中有什么问题(下面的信息)?

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets
(3847): Web deployment task failed.
((4.8.2011 11:01:10) An error occurred when the request was processed on the remote computer.)
(4.8.2011 11:01:10) An error occurred when the request was processed on the remote computer. Unable to perform the operation. Please contact your server administrator to check authorization and delegation settings.

如果有人需要,我可以提供更多信息。

4 个答案:

答案 0 :(得分:194)

通过TFS构建时遇到了同样的问题。当我尝试手动导入网站时,我收到了更多信息:“无法登录用户\ WDeployConfigWriter”。

事实证明,当您安装Web部署时,它会设置两个本地帐户WDeployConfigWriter和WDeployAdmin。这些帐户的密码设置为过期。因此,重置Web服务器上的密码并设置为“永不过期”。然后转到IIS中的管理服务委派。每个呈现的规则都有一个UserName字段。在WDeployAdmin或WDeployConfigWriter的位置右键单击并将凭据更新为新密码。

有关屏幕截图的完整说明,请访问:http://workinghardinit.wordpress.com/2011/07/18/wdeployconfigwriter-account-issues-trouble-shooting-web-deploy-2-0-with-lessons-learned/

答案 1 :(得分:31)

您所要做的就是重新运行脚本" AddDelegationRules.ps1"位于" C:\ Program Files \ IIS \ Microsoft Web Deploy V3 \ Scripts \"

这是首次安装Web部署时运行的脚本。它将重新创建任何缺少的委托,重新设置WebDeployAdmin和WebDeployConfigWriter的密码,并将WebDeployAdmin添加回Administrators组。

重新运行脚本后,您仍然需要在每个帐户上设置密码不会过期。

答案 2 :(得分:11)

我们遇到了同样的问题 - 在我们的例子中,我们只使用 MSDeploy (没有 TFS )。重置这两个本地帐户的密码( WDeployConfigWriter WDeployAdmin )解决了密码已过期的问题。我们尝试将密码策略更改为永不过期,但只有本地管理员可以执行此操作。

答案 3 :(得分:0)

运行此命令lusrmgr.msc 双击用户并  双击帐户名,然后勾选“密码永不过期”。  enter image description here

enter image description here 做完了