1
votes

Appreciate any guidance or advice on below issue

I am using TFS2010 and below msbuild parameters in order to deploy build on staging server (continous deployment). I have done all necessery configuration such as

Management Service Delegation

Management Service

Filesystem Permission

IIS Manager Permission

msbuild parameters

/p:validatearchitecture=true  /p:AllowUntrustedCertificate=True /p:DeployOnbuild=True 
/p:DeployTarget=MsDeployPublish /p:MSDeployPublishMethod=WMSVC 
/p:MsDeployServiceUrl=stagingserver
/p:DeployIISAppPath="cddemo" /p:UserName=username /p:Password=password 
/p:Outdir="D:\Demo\Demo\\" 

Having below error. how to resolve it? and How can I remove https from link and use verbosity parameter to see detailed error.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0 \Web\Microsoft.Web.Publishing.targets (3588): Web deployment task failed.(Remote agent (URL https://stagingserver:8172/msdeploy.axd?site=cddemo) could not be contacted. Make sure the remote agent service is installed and started on the target computer.) Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator. Error details: Remote agent (URL https://stagingserver:8172/msdeploy.axd?site=cddemo) could not be contacted. Make sure the remote agent service is installed and started on the target computer. An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected. The remote server returned an error: (401) Unauthorized.

1
Is the account the build agent is running as have local admin rights on your staging server?MisterIsaak

1 Answers

3
votes

I can only think of two things to try:

  1. Qualify your user name with the server/domain name: /p:UserName:Server\Username
  2. Try explicitly defining /p:AuthType=Basic or /p:AuthType:NTLM