VS 2010 Publish using Web Deploy

Zote picture Zote · Mar 30, 2011 · Viewed 19.3k times · Source

I'm trying to deploy my ASP.NET MVC 3 web application using VS2010 Publish feature. I'm using Web Deploy as Publish method, but I'm getting this error:

Error 1 Web deployment task failed.(Remote agent (URL http://192.168.1.11/MSDEPLOYAGENTSERVICE) 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 http://192.168.1.11/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 'V1' but 'v1' was expected. The remote server returned an error: (401) Unauthorized.

How can I bypass this and to put it work? My server is Windows 2008 R2.

Answer

Kev picture Kev · Mar 30, 2011

Take a look at this answer I provided for someone encountering a different issue, WebDeploy has a few gotcha's:

msdeploy (Web Deploy) failing with 401 auth issues

Also make sure you upgrade to WebDeploy 2.0 if you have control over both your development machine and the server.

And finally make sure you configure the server properly, trust me taking the time over this step can save hair:

Configure Web Deploy