4

I'm trying to build and deploy a web application using MSBuild and TeamCity. I've read multiple SO posts and finally decided on using these parameters

/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>

However, I get the following error:

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'.)

For some reason either teamcity or msbuild assumes that I want to deploy via https which I don't. If I set the p:MsDeployServiceUrl = http:// like I do in Visual Studio I get the following error:

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

Any help would be greatly appreciated.

dalcantara
  • 1,613
  • 2
  • 21
  • 35
  • If you are deploying to Win2k8 then you should use https, have you tested that you can browse to the url from your build server, it could be something as simple as a firewall blocking you. If you get prompted for credentials then the connectivity is working. – David Martin May 25 '12 at 12:56

1 Answers1

3

Have you tried using MSDeployPublishMethod=RemoteAgent? Based on the value for MSDeployServiceURL (i.e. a URL using http instead of https) I'm guessing that you are using the remote agent service instead of calling MSDeploy via the Web Management Service. If that's not right let me know and I can try and dig into this a bit more.

Sayed Ibrahim Hashimi
  • 43,864
  • 17
  • 144
  • 178
  • Thanks for the reply. However, being the newbie I am, I dont quite understand. The server I want to deploy has the msdeploy remote agent installed. I want to publish my build to http://bob which is the server where the remote agent is running. What are you suggesting I change my script (posted above) to? Thanks again! – dalcantara May 21 '12 at 13:00