如何使用WMSVC服务和NTLM身份验证在Team Build 2010中使用MSDeploy进行部署? [英] How do I deploy using MSDeploy in Team Build 2010 using the WMSVC service and NTLM authentication?

查看:173
本文介绍了如何使用WMSVC服务和NTLM身份验证在Team Build 2010中使用MSDeploy进行部署?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Team Build 2010部署到Windows Server 2008 R2 Web服务器.我的构建服务器代理设置为在Windows域帐户下运行.我已经使用IIS管理器权限成功地为我的Web服务器授予了该域帐户权限以进行部署.此帐户不是是网络服务器上的管理员.我可以使用以下参数很好地部署构建:

I am trying to deploy using Team Build 2010 to a Windows Server 2008 R2 web server. My build server agent is setup to run under a Windows domain account. I have successfully given this domain account permissions on my web server for the deployment using the IIS Manager permissions. This account is not an Administrator on the web server. I can get the build deploying just fine using the following parameters:

/p:DeployOnBuild=True 
/p:DeployTarget=MsDeployPublish 
/p:CreatePackageOnPublish=False 
/p:MSDeployPublishMethod=WMSVC 
/p:AllowUntrustedCertificate=True 
/p:MSDeployServiceUrl=webservername
/p:DeployIisAppPath="Web Site Name"
/p:UserName=DOMAIN\BUILDID
/p:Password=buildidpassword

因为其他开发人员将要建立他们的构建,并且我宁愿不发布域帐户的密码,所以我需要使用NTLM身份验证进行部署.我想继续使用Web管理服务方法(WMSVC)进行部署,因此BUILDID不必是管理员.

Because other developers are going to be setting up their builds, and I would rather not publish the password for the domain account, I need to use NTLM authentication to deploy. I would like to continue using the Web Management service method (WMSVC) for deployment so the BUILDID doesn't have to be an administrator.

我已经深入研究了"Microsoft.Web.Publishing.targets",看来我应该能够传递AuthType参数来控制授权类型,但它似乎没有任何作用.我已经尝试过:

I have dug deep into the "Microsoft.Web.Publishing.targets" and it appears that I should be able to pass an AuthType parameter to control the authorization type, but it appears to not have any effect. I have tried:

/p:DeployOnBuild=True 
/p:DeployTarget=MsDeployPublish 
/p:CreatePackageOnPublish=False 
/p:MSDeployPublishMethod=WMSVC 
/p:AllowUntrustedCertificate=True 
/p:MSDeployServiceUrl=webservername
/p:DeployIisAppPath="Web Site Name"
/p:AuthType=NTLM

我还尝试过输入一个空白的用户名(如

And I have also tried putting a blank username (as seen elsewhere on StackOverflow), to no avail. I continue to get the error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5):错误:Web部署任务失败.(使用Web管理服务连接到目标计算机("webservername"),但无法授权.请确保使用正确的用户名和密码,您要连接的站点已存在,并且凭据代表有权访问该站点的用户.)

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): error : Web deployment task failed.(Connected to the destination computer ("webservername") 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.)

我也尝试了上一个链接中提到的UseMsdeployexe参数,但是随后我得到了与web.config转换有关的其他错误.它看起来像

I have also tried the UseMsdeployexe parameter as mentioned in the previous link, but I then get other errors related to the web.config transformation. It looks like the issue is already on Microsoft Connect and is listed as being fixed in the next issue.

推荐答案

还有一个额外的步骤,我从没做过:

There is an additional step, which I never picked up on:

来源

您可以选择使用户能够通过Web进行身份验证 使用NTLM的管理服务.为此,请在 通过添加名为"WindowsAuthenticationEnabled"的DWORD密钥添加服务器 在HKEY_LOCAL_MACHINE \ Software \ Microsoft \ WebManagement \ Server下,并且 将其设置为1.如果已经启动了Web管理服务,则 设置将在重新启动服务后生效.

You can optionally enable users to authenticate with the Web Management Service using NTLM. To do this, update the registry on the server by adding a DWORD key named "WindowsAuthenticationEnabled" under HKEY_LOCAL_MACHINE\Software\Microsoft\WebManagement\Server, and set it to 1. If the Web Management Service is already started, the setting will take effect after the service is restarted.

这篇关于如何使用WMSVC服务和NTLM身份验证在Team Build 2010中使用MSDeploy进行部署?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆