Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2010 TFS Build Failure-Could not complete the request to remote agent

I received this error when trying to run a build from within VS2010.

C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (3588): Web deployment task failed.(Could not complete the request to remote agent URL 'https://http//[serverName]:8172/msdeploy.axd?site=Default Web Site'.) Could not complete the request to remote agent URL 'https://http//[serverName]:8172/msdeploy.axd?site=Default Web Site'. The remote name could not be resolved: 'http'

I'm not sure why it says "https://http//..."
The code is checked in to a remote TFS server. I created a Build Definition from within VS Team Explorer and that is the error I get when trying to build/publish the project. The [servername] above is the IIS server to where my project is to be published.

These are the MSBuild Arguments:

/p:DeployOnBuild=True 
/p:DeployTarget=MsDeployPublish 
/p:CreatePackageOnPublish=False 
/p:MSDeployPublishMethod=WMSVC 
/p:MSDeployServiceUrl=http://[serverName] 
/p:DeployIisAppPath="Default Web Site/[site/app Name]"

Anyone come across the same error?
btw, I was able to do a successful Web Deploy from within VS Publish itself

like image 287
user897052 Avatar asked Dec 27 '22 13:12

user897052


2 Answers

Edward solved the first part of your problem.

Regarding the https:// part, msdeploy defaults to doing things in a secure manner. To turn this off you have to use the -allowUntrusted command.

for "light" reading: http://weblogs.asp.net/scottgu/archive/2010/09/13/automating-deployment-with-microsoft-web-deploy.aspx

and

http://forums.iis.net/t/1158582.aspx

like image 113
NotMe Avatar answered Dec 31 '22 01:12

NotMe


I'm pretty sure that you either need to specify just a hostname to the MSDeployServerUrl option, or a full URL to msdeploy. That is, either:

/p:MSDeployServiceUrl=http://[servername]:8172/msdeploy.axd

or:

/p:MSDeployServiceUrl=[servername]

The latter will be translated to https://[servername]:8172/msdeploy.axd.

like image 28
Edward Thomson Avatar answered Dec 31 '22 01:12

Edward Thomson