Web site renders different from different servers
This is my setup.
I am running a local web server on the network (windows 7/IIS7) and I have a dedicated server with a hosting provider (Windows 2008/IIS7.5)
When I upload the website (ASP.net MVC 3.0) to the local server I can access if correctly in all browser (IE7/IE8/FireFox/Chrome).
When I upload the website to the dedicated server I can access the site correctly with (IE8/FireFox/Chrome) and it renders correctly, but it does not render correctly in IE7 it appears as if the CSS are not being downloaded.
I installed Fiddler and confirmed that the same files (css/js) are being downloaded with IE7 as with the browser. I also compared the browser source of IE7 with the other browser and there was no difference.
At this point I am totally stumped as to why IE7 would not work with the dedicated server while it works for the internal server. (Note that both servers work fine for all other browsers).
Final notes for the internal server I access the website as http://192.168.0.160开发者_开发技巧/ for the external server I access the website as http:/domain_name/
Any insight, ideas, hunches would be greatly appreciated.
Try putting the following tag in your <head></head>
section:
<meta http-equiv="X-UA-Compatible" content="IE=8">
I've had similar problems with IE 8 rendering pages as IE 7, etc. The X-UA-Compatible meta tag forces IE 8 to render as IE 8. You can also use it to force it to render in compatability mode as well.
The issue turned out a security issue on the production server. The css file did not have the correct permissions and hence where not downloaded by the browser. Fiddler picked up on it by I didn't clue in right away.
精彩评论