MSDeploy is really good for deploying websites and syncing up websites but it can be a real pain to configure and get going intially. The MSDeploy documentation is a bit poor as well and quite often you'll get a very strange error which can be quite cryptic. Here's a good example that had me stumped for a little while:
Info: Using ID '0204878c-dbb9-4ac8-8d38-1ed9f6f91e0b' for connections to the remote server. Error Code: ERROR_DESTINATION_NOT_REACHABLE More Information: Could not connect to the destination computer ("X.X.X.X"). On the destination computer, make sure that Web Deploy is installed and that the required process ("The Web Management Service") is started.
Error: The remote server returned an error: (404) Not Found.
Error count: 1.
The error message isn't actually too bad in this case, it's saying either the Web Management Service isn't running OR it can't find MSDeploy. Ok so checklist for this problem:
- Web Management Service (WMSVC) is running on the target server
- Port 8172 is open (checked with Telnet for good measure)
- I can connect to https://servername:8172/msdeploy.axd
- MSDeploy is installed (c:\program files\IIS\MSDeploy\Microsoft Web Deploy V2\msdeploy.exe)
After running through all of this I still received the ERROR_DESTINATION_NOT_REACHABLE message. So after a while of head scratching I looked at the msdeploy version numbers and noticed that my package was created on the build server using msdeploy version 7.1.1046.1 but on the target servers it was runing the latest version of MSDeploy which at the time of writing is 7.1.1070.1. Something suspicious perhaps!!
The Fix
I installed MSDeploy version 7.1.1046.1 on the target servers and bingo no more nasty error messages! I don't know if this is just a coincidence and I will try and test by upgrading the build server version to the latest MSDepply version but for now this fixed the issue.
d3be7631-7522-4bf0-8b05-ac7bb906520b|0|.0