Common Web Deploy connection errors (and recipes for fixing them)

Posted: Sep 22, 2010  5 comments  

Average Rating

Share this Post

Note: this is a cross-post from bilalaslam.com

Because Web Deploy is a client-server product, unless it is set up correctly, chances are you will hit a wall pretty quickly at the point where a connection is made. In this blog post, I will show you common solutions for common errors.

Read on for general tips and recipes for fixing common connectivity errors.

General Tips

  • Web Deploy sometimes returns different information in errors messages if you provide administrator credentials vs. non-administrator credentials. If you hit an error, try to run the command as administrator.
  • Web Deploy sometimes returns different information if source and destination machine are the same vs. destination machine is remote. If you hit an error, try to run it on the remote machine.
  • Run the command with –verbose and –debug switches. These will make Web Deploy spit out more information which can be useful in debugging.

Error: 503 Server Unavailable

Error Trace:

msdeploy.exe -verb:dump -source:apphostconfig,computerName=demo-host

Error: Object of type 'appHostConfig' and path '' cannot be created.
Error: Remote agent (URL http://demo-host/MSDEPLOYAGENTSERVICE) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.
Error: An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected.
Error: The remote server returned an error: (503) Server Unavailable.
Error count: 1.

Why it happens:

  • Incorrect destination name or host unreachable.
  • Remote Agent Service not installed on destination.

How to fix it:

  • Make sure you can ping the remote computer.
  • Run this command on the destination in an elevated command prompt: “net start msdepsvc”. This will start the Remote Agent Service on the destination, which allows administrator deployments.

Error: Default credentials cannot be supplied for the basic authentication scheme

Error Trace:

msdeploy.exe -verb:dump -source:apphostconfig,wmsvc=demo-host
Error: Object of type 'appHostConfig' and path '' cannot be created.
Error: The specified credentials cannot be used with the authentication scheme 'basic'.
Error: Default credentials cannot be supplied for the basic authentication scheme.
Parameter name: authType
Error count: 1.

Why it happens:

  • You are telling Web Deploy to connect to the Web Management Service on the destination. By default, Web Deploy will connect using HTTP Basic Authentication.
  • When using HTTP Basic Authentication, specific credentials must be supplied, which is not true in the command shown above.

How to fix it:

Change the command to:

msdeploy.exe -verb:dump -source:apphostconfig,wmsvc=demo-host,authType:basic,username=someuser,password=somepassword

Error: The remote certificate is invalid according to the validation procedure.

Error Trace:

msdeploy.exe -verb:dump -source:apphostconfig,wmsvc=demo-host,authType=basic,username=someuser,password=somepassword
Error: Object of type 'appHostConfig' and path '' cannot be created.
Error: Could not complete the request to remote agent URL '
https://demo-host:8172/msdeploy.axd?Site='.
Error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Error: The remote certificate is invalid according to the validation procedure.
Error count: 1.

Why it happens:

  • You are connecting to the destination using the Web Management Service (wmsvc), which creates an HTTPS connection.
  • The certificate on the destination is invalid, so you see this error.

How to fix it:

  • Install a valid wmsvc certificate on the destination
  • OR add the –allowUntrusted flag on the command

msdeploy.exe -verb:dump -source:apphostconfig,wmsvc=demo-host,authType=basic,username=someuser,password=somepassword –allowUntrusted

Comments

ok, this [url=www.shoppharmacycounter.com]cheap ephedra[/url] is like the main thing over all of topics i've listened to

Sep 24 2010 by felici

How about this one:

Error: Remote agent (URL wnd00054/MSDEPLOYAGENTSERVICE) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.

Error: An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected.

Error: The remote server returned an error: (401) Unauthorized.

Error count: 1.

I am trying to use the contentPath provider between 2 computers using an IIS user.

msdeploy -verb:sync -source:contentPath=E:\inetpub\MSDEPLOYTEST2\App3 -dest:contentPath=E:\inetpub\MSDEPLOYTEST2\App3,computerName=WND00054,userName=MSDEPLOYUSER,password=MSDEPLOYPASS -whatif

This works if I use a domain account, not with an IIS user.  I've granted permissions for Local Service on the site and the content directory on both boxes.  Any ideas?

Thanks,

Alan Levine

Nov 03 2010 by aplevine

Thanks Bilal for this brave initiative. Seems like a lot of people are struggling with the same issues when using MSDEPLOY with remote servers.

I'm struggling with the "401 Unauthorized"-error as well, while performing a:

MSDEPLOY -VERB:DUMP -source:apphostconfig,computername=VM_WEBSERVER,username=VM_WEBSERVER\ADMINACCOUNT,password=password -dest:apphostconfig,computername=VM_WEBSERVER

I come across a lot of unanswered forum posts regarding this problem.

You think you can give this problem some extra attention?

Thanks in advance

Nov 10 2010 by dbevernage

Hello,

When I attempt to publish my site with a dataconnection to a sql server, I get msg that webmatrix deploy Unrecognized skip directive and unable to publish.  

Summary: I wrote a web site in Visual Studio 10 express and did not see how to publish the site.  I then rewrote it in WebMatrix 2.0, it published fine until I changed my web.config to include a reference to sql server.  Now I cannot publish using web deploy.  My hoster has been absolutely no help to me.

Publish Error - Unrecognized skip directive '1558;initial catalog'. Must be one of the following: "objectName," "keyAttribute," "absolutePath," "xPath," "attributes.<name>."SQL connection string in Web.config is:Data Source=Servername,1558;Initial Catalog=CatName;User ID=UserID;Password=Password"; (with actual values used)

My questions:

Is the problem with the new WebMatrix beta software or the hoster's server software?

Is this the correct forum for this complaint?  

Why when I click webdeploy do I get unable to publish errors.

Thanks,  

Nov 20 2011 by Locum

I was getting the following error and just wanted to report that I fixed this by restarting VS2010. Thanks!

Error    27    Web deployment task failed.(Remote agent (URL 192.168.10.13/MSDEPLOYAGENTSERVICE) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.)

Remote agent (URL 192.168.10.13/MSDEPLOYAGENTSERVICE) 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 request was aborted: The request was canceled.

COM object that has been separated from its underlying RCW cannot be used.

Dec 02 2011 by ludwigs3rd

Submit a Comment

  • Plain text is accepted.
  • URLs starting with http:// are converted to links.