Web Deploy - Could not connect to the remote computer

Posted on
IIS Web Deploy Visual Studio

Using Web Deploy is a nice and easy way to publish websites and web applications with Visual Studio. However, I found one thing that can be a bit of a blocker, that didn't seem to be explained anywhere very well.

Let's imagine I administer a webserver that hosts the site www.something.com. I've installed the Remote Management tools for IIS and the Web Deploy stuff, and have also configured the site to allow Web Deploy. I now try and deploy using Visual Studio, with the settings below:


Validating the connection fails with the message:

'Could not connect to the remote computer “somesite.com”. On the remote computer, make sure that Web Deploy is installed and that the required process (“Web Management Process”) is started. [more stuff] ERROR_DESTINATION_NOT_REACHABLE.

So what do we try first?

  • Check the Web Deploy feature is installed on the server, it is.
  • Check the Web Management Process is running, it is.
  • Check port 8172 is open, it is.
  • Read up on similar issues, they say the same as the above.
I spent quite some time pulling my hair out over this - is it because I'm on a different domain? Is there some other port that needs to be open too?

Now the error says ‘could not connect to the remote computer “somesite.com”’ - so maybe the issue is here. I try the IP address, www.somesite.com and the IP address with the port 8172 specified - no joy.

It turns out, that even though it says ‘Server’ in the first box (leading us to think it would be the address of a server we need), it's actually the server with http specified. Change the Server from somesite.com to http://www.somesite.com and it works a charm.

Not the most exciting post ever, but hopefully this'll save someone else wasting the same amount of time that I did.