Question

I'm having trouble setting up an Azure VM for hosting .NET web applications (MVC).

The steps I took:

  1. Create VM - Server 2012 Datacenter R2
  2. Installed IIS through server manager
  3. Added two web applications to IIS
    1. .NET 4 MVC application with forms authentication
    2. Empty site with just a single default.htm file (note that I can browse both sites and the default IIS site from within the VM)
  4. Added endpoints for the VM in the Azure portal for port 80 (and 8080 for good luck!)

Trying to follow the DNS name url, I get the browser's page not available - took too long to respond type message. Looking in the networking tab of the Chrome dev tools, I can see that the request never completed and is just sat in a pending state.

The same occurs if I navigate to the public VIP address (138.91.118.85).

I've tried added host headers (on port 80) for the two sites and then referencing them in my local hosts file, also with no luck.

I checked the firewall on the VM and port 80 (and 443) appear to be open by default. I added new in and out rules for port 80 but this made no difference.

When RDP'ing onto the VM, I can see the sites working. I tested this in two ways:

  1. Added custom port bindings (e.g. localhost:81)
  2. Added custom host address and added to VM hosts file

Can anybody tell what I'm doing wrong?

Was it helpful?

Solution

Thanks for you comments, I've solved the issue.

I can't explain what was broken because I simply do not know. I created a brand new VM and installed it in the same way and this worked first time. I've dropped the broken one.

One thing I did do different is that I set up the endpoints in the Azure portal first, then I RDP'd onto the box, installed IIS, and deployed my sites.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top