2

I have hosted my website as an application on IIS and I can access it by http:\localhost\myApp\default.aspx but not with my IP.

I have another application hosted in the same machine which can be accessible in both localhost and IP address.

Error message from different browsers:

IE: Internet Explorer cannot display the webpage

Firefox: Firefox can't establish a connection to the server at 192.168.**

Chrome: This webpage is not available

I can access all other pages except default.aspx.

What default.aspx does?

It just loads a flash file.

What happens when I browse http:\localhost\myApp\default.aspx?

It redirects to https:\localhost\myApp\default.aspx

Note the s above.

Few other detais:

  • Port 80 is enabled.
  • Read permission is there for default.aspx.
  • The website is hosted as application under Default Web Site and the http binding is All Unassigned.
  • Created a separate pool with Integrated pipeline mode.

What might be the cause for this issue?

3 Answers 3

4

There was a strange code inside the default.aspx page, which was redirecting the page to https if the server is not localhost along with some other condition, there by causing the server to refuse the request.

Sorry for the stupidity, I could have check that before asking a question here.

1
  • Just remember to give your answer the checkbox once enough time has passed :) Jul 17, 2012 at 0:55
3

Check that your webserver is configured to listen on your 192.168.** IP address. Check that your firewall has port 80 on your 192.168.** IP address open.

3
  • The port 80 is enabled for the IP. The strange thing I noticed is, I'm able to access the pages other than the default.aspx. I'm getting the above error only for that page(default.aspx). Please let me know, for any further clarifications.
    – NaveenBhat
    Jul 16, 2012 at 11:34
  • 1
    Check that the webserver has permission to read the default.aspx file.
    – user9517
    Jul 16, 2012 at 11:36
  • Yes the permission is there. Well, the other thing I noticed is, when I browse http:\localhost\myApp\default.aspx it is automatically redirecting to https.
    – NaveenBhat
    Jul 16, 2012 at 12:00
1

This sounds most likely to be a firewall issue, if port 80 is closed to the outside world it would still be available on the loopback address (localhost).

What version of Windows are you running? The more info we have the more we can help you reconfigure your firewall. Alternatively you could just momentarily disable the firewall to perform the test and go from there.

Also, is your other application hosted on the standard webserver port in IIS? If so then the above probably won't help, one other thing to check is the bindings for the website - open iis, then drill down to the individual site in the connections bar on the left, then take a look on the right and click bindings. If the bindings are set to 127.0.0.1 or ::1 then that will be your issue, you either have to assign it to "All unassigned" or an individual IP.

It also might be that you've assigned an IP to your other project and therefore the "all unassigned" option only gives you the loopback address as an option, if in the drop down box the only option is "All unassigned" then this is probably the case. The fix, in this case, would be to set your other project to be "All unassigned" too.

2
  • Please check my comments on lain's post.
    – NaveenBhat
    Jul 16, 2012 at 11:36
  • The binding is All unassigned.
    – NaveenBhat
    Jul 16, 2012 at 11:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .