WebDeploy 403 and 404 Error Messages

 

If you use WebDeploy on your IIS Servers, and have trouble to publish web sites on them using the WebDeploy tool, you may have received errors such as: Could not connect to the remote computer (“targetserver”). On the remote computer, make sure that Web Deploy is installed and that the required process (“Web Management Service”) is started. Learn more at http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Error: The remote server returned an error: (404) Not Found.

You have probably found articles saying you must check the firewall on port 8172 and restart services such as MsDepSvc and WmSvc.

However those articles fail to explain that both services do not come with WebDeploy and these workaround don’t solve 40x errors.

  • MsDepSvc comes indeed with WebDeploy but doesn’t list’en on the TCP/8172 port; it just adds a .axd HTTP module to perform its work
  • This module works on top of the IIS Management Service WmSvc which is the listener on port 8172 and comes as a role service under IIS 7.0 or higher

Therefore if you encounter various error messages during your WebDeploy tasks, check

  1. that the IIS Management service has been installed as the MSI Installer for WebDeploy (at least in version up to 3.6) doesn’t check for the prerequisites:Web Management Service_role_services_selection
  2. Configure this service in the IIS Console to accept remote connections:IIS-Web-Management-Service-Configuration
  3. re-install or repair WebDeploy using its MSI for everything to work.:webdeploy_35_install_options