IIS displaying page differently when localhost is used in URL vs. hostname

Posted by maik on Server Fault See other posts from Server Fault or by maik
Published on 2010-05-17T18:57:36Z Indexed on 2010/05/17 19:01 UTC
Read the original article Hit count: 457

Filed under:
|

I'm having (yet another) strange problem with IIS. When viewing an ASPX page I've designed on my local machine by browsing to http://localhost/page.aspx the page looks as expected (and looks the same in IE, Firefox and Chrome. If I change localhost to my_hostname the page is rendered with a disabled vertical scroll bar.

The behavior was first noticed when I published my site to our live server and saw the same discrepancy. After beating my head against the wall I tried what I described above and was able to duplicate my "problem". So with that, I turn to you guys.

This wouldn't really be an issue (save for the cross-browser inconsistency) except that this screws up an "absolute"ly positioned <div> moving it partway off the screen instead of being centered like it should be (and is when viewed any other way except in IE when the address is anything but localhost).

© Server Fault or respective owner

Related posts about iis

Related posts about css