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.
Take a look at this answer I provided for someone encountering a different issue, WebDeploy has a few gotcha's:
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: