11

I have an ASP.NET MVC site that is hosted on an Amazon EC2 service. I want to establish auto deploy with MS WebDeploy to this site. I've found a great article about this: Automating Deployment with Microsoft Web Deploy.

I can't reach https://mySite:8172/MsDeploy.axd because port 8172 is closed on Amazon by default. I am not very familiar with EC2 service configuration so I can't find out how to open this port over https protocol. I've reconfigured IIS to use default port (433) and I was open this port on the Amazon security group that is used for my site.

Now I've tried to open https://mySite/MsDeploy.axd in a web browser. IE requests credentials, makes note of a certificate error (I clicked "Continue..") and forwards me to 404.

Just to be sure, I tried to deploy via VS 2010, and of course it doesn't work.

Can anybody who has experience using MS Web Deploy in Amazon EC2 tell me what I'm doing wrong?

Ann L.
  • 12,802
  • 5
  • 30
  • 60
RredCat
  • 4,775
  • 3
  • 54
  • 91
  • 1
    Two things. First: in order to open port 8172, you need to a)Open it in the security group of your EC2 instance, on the AWS Control Panel/EC2/Security Groups. b)Open Windows Firewall. Second: The certificate error happens because most likely there is no certificate on your instance, or because its Common Name does not match the instance FQDN. The 404 is a symptom that the deployment is no available on IIS. – Viccari Jul 09 '12 at 15:25
  • About step one - I can't found how to specify port which I want to open. I can choose type of port, for instance: https and it opens me 433. But I can't find how to set number of port. – RredCat Jul 10 '12 at 07:05
  • 1
    In the `Create a new rule` dropdown, select `Custom TCP rule`. This way you will be able to specify which port you are opening. Then, choose port 8192 and enter the client IP address in the `Source` field. – Viccari Jul 10 '12 at 11:00
  • @Viccari Thanks. You completely answer on my question. Unfortunatelyv I can't mark it as answer. – RredCat Aug 01 '12 at 13:37
  • 1
    I have added an answer, so others with similar problems might benefit of it too. – Viccari Aug 01 '12 at 16:05

1 Answers1

9

Two things.
First: in order to open port 8172, you need to
a)Open it in the security group of your EC2 instance, on the AWS Control Panel/EC2/Security Groups:
In the Create a new rule dropdown, select Custom TCP rule. This way you will be able to specify which port you are opening. Then, choose port 8172 and enter the client IP address in the Source field.
b)Open Windows Firewall.

Second: The certificate error happens because most likely there is no certificate on your instance, or because its Common Name does not match the instance FQDN. The 404 is a symptom that the deployment is not available on IIS.

Martin Buberl
  • 42,048
  • 25
  • 96
  • 139
Viccari
  • 8,299
  • 4
  • 38
  • 74
  • My comment to this: I didn't do anything with Firewall - it works correct by default on Amazon (on my dedicated web server too). Related to certificate: I allowed untrusted certificate (marked my server as trusted). And now it works for me. – RredCat Aug 01 '12 at 18:15
  • The default port is 8172, rather than 8192. – Jonathan Jul 23 '13 at 15:02
  • After doing this, I still had to update the Web Deployment package on my server before it would allow me to connect. I found instructions here: http://docs.aws.amazon.com/gettingstarted/latest/computebasics/getting-started-deploy-app-download-app.html – Patrick Apr 08 '14 at 21:15