dalcantara
dalcantara

Reputation: 1611

Issue deploying with MSBuild and TeamCity

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.

Upvotes: 4

Views: 1187

Answers (1)

Sayed Ibrahim Hashimi
Sayed Ibrahim Hashimi

Reputation: 44312

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.

Upvotes: 3

Related Questions