2012-05-03 71 views
4

我想用MSBuild和TeamCity构建和部署一个Web应用程序。我读过多个职位SO,最后决定使用这些参数用MSBuild和TeamCity部署问题

/p:Configuration=Debug 
/p:OutputPath=bin 
/p:DeployOnBuild=True 
/p:DeployTarget=MSDeployPublish 
/p:username=BuildUser 
/p:password=Password1 
/p:AllowUntrustedCertificate=True 
/p:DeployIisAppPath=<siteName> 
/p:MSDeployPublishMethod=WMSVC 
/p:MsDeployServiceUrl=http://<servername> 

不过,我得到以下错误:

Could not complete the request to remote agent URL .(Could not complete the request to remote agent URL 'https://10.10.10.42/MSDEPLOYAGENTSERVICE:8172/msdeploy.axd?site=CFS.Services.Hosting'.)

出于某种原因,无论是TeamCity的或MSBuild的假设,我想通过部署https我不这样做。如果我设定的号码:MsDeployServiceUrl = HTTP://就像我在Visual Studio 做我得到以下错误:

Could not complete the request to remote agent URL 'https://http//10.10.10.42:8172/msdeploy.axd?site=CFS.Services.Hosting'.

任何帮助将不胜感激。

+0

如果您正在部署到Win2k8,那么您应该使用https,您是否测试过可以从构建服务器浏览到URL,它可能与阻止您的防火墙一样简单。如果提示您输入凭据,则连接正在工作。 –

回答

3

您是否尝试过使用MSDeployPublishMethod=RemoteAgent?根据MSDeployServiceURL的值(即使用http而不是https的URL),我猜测您正在使用远程代理服务,而不是通过Web管理服务调用MSDeploy。如果这不对,请告诉我,我可以尝试再深入探讨一下。

+0

感谢您的回复。然而,作为新手,我不太明白。我想要部署的服务器安装了msdeploy远程代理。我想将我的版本发布到http:// bob,这是远程代理正在运行的服务器。你在暗示我将我的脚本(在上面发布)改为?再次感谢! – Buzzer