7

I am trying to deploy my application using the following msdeploy command:

MSDeploy.exe -source:contentPath="C:\Users\myUser\Documents\ui\dist" -dest:contentPath='c:/inetpub/wwwroot/dist',computerName="https://ec2-xx-xxx-xx-xx.ap-northeast-1.compute.amazonaws.com:8172/MSDeploy.axd?site=Default Web Site",username="administrator",password="XXXXXXXXX",authtype="Basic",includeAcls="False" -verb:sync -allowUntrusted

Getting the following error:

Working...
    Info: Using ID '01657062-cece-4713-8dc6-585537b265fd' for connections to the rem
    ote server.
    >> Error Code: ERROR_DESTINATION_NOT_REACHABLE
    >> More Information: Could not connect to the remote computer ("ec2-52-207-222-6
    5.compute-1.amazonaws.com"). On the remote computer, make sure that Web Deploy i
    s 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: Unable to connect to the remote server
    >> Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xx.xxx.xx.xx:8172

I tried the same command for 6 other servers and it worked fine, but not working for 2 of the servers which are configured the same way.

  1. All the IIS installables are in place
  2. Firewall inbound rule for port 8172 (TCP) is in place, There are no issues with the other Firewall rules as i have turned the Firewalls off
  3. Installed Web Deploy 3.6 and Web deploy 3.6 for Hosting servers
  4. Made sure Web Management Service,Web Deployment Agent Service is started and set to Automatic

What am i missing ?

hakuna
  • 4,223
  • 8
  • 39
  • 68

3 Answers3

4

Added the rule to security group for port 8172 and it started working. But i have no clue why it was working from Visual studio before and not from command prompt.

hakuna
  • 4,223
  • 8
  • 39
  • 68
3

To successfully deploy your website on to windows server using Web deploy, make sure the following is in place.

  1. The site names must be exactly matched in both Visual studio and on IIS server

  2. Make sure the sever installed with the same.net framework as your visual studio (e.g ASP, ASP.net 4.5…)

  3. Make sure port 8172 is open on the server(8172 is used for web deploy)

Hung Vu
  • 4,698
  • 2
  • 22
  • 25
  • 3
    Also have to have the Web Remote Managment service installed and running, you can start it from admin command prompt with `net start wmsvc` – Warren P Oct 11 '16 at 18:13
  • 3
    Also, if you're trying to deploy to AWS, as it seems you are, you also have to open port 8172 in the Security Groups section of the AWS management site. You'll want to create a "Custom TCP Rule". – CowboyBebop Mar 20 '17 at 00:24
0

If you're using google cloud, my solution was to open port 8172 through google's web interface. Computer Engine>VM instances>Network interfaces>nic0>default-allow-http enter image description here

L.Le
  • 55
  • 8