开发者

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

开发者 https://www.devze.com 2023-04-11 00:16 出处:网络
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.t开发者_运维问答argets (3588): Web deplo

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.t开发者_运维问答argets (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


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


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.


It's been a while since the question being opened, but I came across same problem and it wasn't fully resolved with answers above...

What I needed to change was removing protocol from MSDeployServiceUrl

/p:MSDeployServiceUrl=[servername]

AND changing MSDeployPublishMethod to RemoteAgent

/p:MSDeployPublishMethod=RemoteAgent

Hope this will be useful for others.


I created a Publish Profile using web deploy and saved in TFS and then in my build definition in MSBuild Arguments I added this:

/p:DeployOnBuild=True;PublishProfile=Web_Dev_WebDeployProfile  /p:AllowUntrustedCertificate=True /p:username=myusername /p:Password=mypassword

It worked for me. I also make sure that my build has permission to the published folder (virtual directory)

I also make sure that Web Management Service and Web Deployment Agent Service are running on my web server.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号