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
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:
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).
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.
Make sure you have the WMSvc Service (Web Management Service) set to 'Auto' (and started) so it's on when you restart & check out this link
Although a lot of different unrelated things can contribute to getting the 404, I solved it for my by.
After this, everything works fine. Assuming the Web Management Service is setup correctly (mine is configured to accept remote connections, the firewall port was opened, and the user I'm uploading with was added to every single Site that I want to deploy to (using the IIS Manager Permissions icon in each Site node in the IIS Manager)).