I am trying to use VS2010's 1-Click Publish feature to deploy a test site from my laptop to my server. I have the firewall turned off on both machines and the MS Deployment Service is up and running on both my laptop and the server.
However, when I try and publish from VS2010 on my laptop I get the following error:
Error 1 Web deployment task failed.(Remote agent (URL https://192.168.1.181/:8172/msdeploy.axd?site=LocationsTest) could not be contacted. Make sure the remote agent service is installed and started on the target computer.)
The requested resource does not exist, or the requested URL is incorrect.
Error details:
Remote agent (URL https://192.168.1.181/:8172/msdeploy.axd?site=LocationsTest) 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: (404) Not Found. 0 0 Test.Web
Any idea what I am doing wrong here?
This same message would occur almost at random when publishing projects from visual studio 2010.
The fix was to delete the
$projectname.Publish.xml
file (in the root directory of the project) and re-create it.If you are using an SSL certificate you should go into Management Service under the IIS Manager section of Server Manager and stop the service, select the correct certificate and then start the service again. This is what worked for me (I was getting Forbidden message).
I was able to fix the same issue when I changed the "Service URL" which uses "Windows Management Service" from:
to this which uses "Remote Agent Service" instead:
It worked just fine after that.
We found the issue was because WebDeploy was installed before the Web Management Service feature was enabled on a Windows 2008 server. After Web Management Service is installed, uninstall Web Deploy fully. Then resinstall and make sure all components of the package are selected.
Following the reinstallation we were immediately able to publishing to the server from my local machine, and also from our CI.
A couple of points to note after reading the other answers:
Even though all required software are installed I had similar error. I noticed that the service URL didn't prefixed with http://. Once prefixed it works well.
Like a dummy, this error was throwing for me because I hadn't installed the Remote Web Agent as part of the Web Deployment Tool available here.