通过wmsvc将MSDeploy部署到IIS6

问题描述:

我正在尝试使用msdeploy.exe将网站部署到IIS6盒中.我可以使用Visual Studio 2010将相似的网站发布到同一服务器,因此我知道MS Deployment Agent服务正在正确运行和配置.但是,当我尝试运行命令时,例如:

I'm trying to deploy a website to an IIS6 box using msdeploy.exe. I can publish similar websites to the same server using Visual Studio 2010, so I know that the MS Deployment Agent Service is running and configured correctly. But when I try to run a command, like say:

msdeploy -verb:sync -source:contentPath=C:\source\ -dest:iisApp="beta",wmsvc=beta.alanta.com,username=Administrator,password=xxx

然后我收到此错误消息:

Then I get this error message:

错误:无法完成对远程代理URL' https:/的请求/beta.alanta.com:8172/msdeploy.axd?Site=beta '. 错误:无法连接到远程服务器 错误:无法建立连接,因为目标计算机主动拒绝了它74.208.74.114:8172 错误计数:1.

Error: Could not complete the request to remote agent URL 'https://beta.alanta.com:8172/msdeploy.axd?Site=beta'. Error: Unable to connect to the remote server Error: No connection could be made because the target machine actively refused it 74.208.74.114:8172 Error count: 1.

确定,这很有意义:这是IIS6计算机,它采用不同的URL语法.但是,如果我尝试在此处推荐的语法,如下所示:

OK, that makes sense: this is an IIS6 machine, and it takes a different URL syntax. But if I try the syntax that's recommended here, like so:

msdeploy -verb:sync -source:contentPath=C:\source\ -dest:iisapp="beta",wmsvc=http://beta.alanta.com/MsDeployAgentService,username=Administrator,password=xxxx

然后我收到此错误消息:

Then I get this error message:

错误:无法完成对远程代理URL' https://http//beta.alanta.com/MsDeployAgentService:8172/msdeploy.axd?Site = beta ". 错误:无法解析远程名称:"http" 错误计数:1.

Error: Could not complete the request to remote agent URL 'https://http//beta.alanta.com/MsDeployAgentService:8172/msdeploy.axd?Site=beta'. Error: The remote name could not be resolved: 'http' Error count: 1.

换句话说,msdeploy命令要坚持在我放置的URL前面加上SSL前缀-但此框未配置SSL.最近两个小时,我一直在搜寻Google,但找不到正确的语法.有什么建议吗?

In other words, the msdeploy command wants to insist on throwing an SSL prefix in front of any URL that I put in there - but SSL isn't configured on this box. I've been googling for the last two hours, and can't figure out the right syntax. Any suggestions?

使用此博客上的msbuild命令,我遇到了同样的问题: http://www.troyhunt.com/2010/11 /you-deploying-it-wrong-teamcity_24.html .

I had the same problem using msbuild command found on this blog: http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity_24.html.

最后,我发现将Publish方法更改为MsDepSVC可以解决此问题并正常工作.

Finally, I found that changing the Publish Method to MsDepSVC solve this issue and worked properly.

这是我的msbuild属性: /P:配置=%env.配置%
/P:DeployOnBuild = True
/P:DeployTarget = MSDeployPublish
/P:MsDeployServiceUrl=https://%env.TargetServer%/MSDeployAgentService /P:AllowUntrustedCertificate = True
/P:MSDeployPublishMethod = MsDepSVC
/P:CreatePackageOnPublish =真
/P:UserName = anAdminDeployBot /P:Password = aGre4tP4ssw0r6

here are my msbuild properties: /P:Configuration=%env.Configuration%
/P:DeployOnBuild=True
/P:DeployTarget=MSDeployPublish
/P:MsDeployServiceUrl=https://%env.TargetServer%/MSDeployAgentService /P:AllowUntrustedCertificate=True
/P:MSDeployPublishMethod=MsDepSVC
/P:CreatePackageOnPublish=True
/P:UserName=anAdminDeployBot /P:Password=aGre4tP4ssw0r6