deployed application appears different in IE8 - asp.net

I developed an application locally using the Visual Studio 2008 built-in web server and it is running nice and neat on every single browser.
When we deployed it on the IIS6 and open it on IE8, there are rendering issues. The fonts are bigger than the other browsers (which are still nice and neat) and some components just moved around. The generated HTML is the same as the others.
How can this be fixed?

Which DOCType are you using - are you in "quirks mode" or "standards mode"?
Are you using a CSS reset?
Are you using the IE7 compatibility tag?
There are ways to fix what's "wrong" but without seeing your code, determining what's wrong is difficult.
Press F-12 in IE8 and see what browser mode you are in. If you're in "quirks mode" you're in trouble.

Thanks to Diodeus and thirtydot we figured out how to solve the problem.
The meta tag "X-UA-Compatible" allow you to control the way Internet Explorer interprets and displays your webpage. when i set , it overrides the ie7 rendering mode that IIS 6.0 puts IE 8.0 into.
Here is some useful information about that:
http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx

Related

My website doesn't look good on my local webserver on ie8 & ie11, but it looks good on google chrome

My other issue is that I am trying to run it in my local webserver (Window Server 2008), and the website seems to have a problem with IIS7 I guess because when I run it on iE (8 & 11), the menu doesn’t look good, and the slider too, but when I run it on google chrome, in my local webserver, the problem goes away. Do you think it would be any solution to work something around it, because I need to run it in ie. I tried hosting it with goddady and doesn’t seem to have any of these problems. Any advice is appreciated thanks
If Javascript is an option you could use the modernizr library.
It backports the modern html and css that you are using to work on older browsers.
Without you posting any code or detailing your server configuration that's about all the advice that can be given.
When I run it on Internet Explorer my navigation bar, doesn't work properly and some other elements do not show. But with google chrome everything works good. In the beginning I thought it was a browser issue so I hosted with Goddady and it worked perfectly with ie8 - ie11. So it doesn't make it a browser issues, it something between ISS7 & Internet Explorer (because even with ie11 doesn't work). Thanks

My ASP.NET website is not displayed correctly in Internet Explorer 10 after server deployment

I've created a website using ASP.NET (C#) Framework 4.0
When running on my local IIS (in debug/release - before and after deployed) - the website is displayed correctly - as intended (checked on Internet Explorer 9, 10, Chrome and FireFox)
After I've deployed the website to my server (Windows Server 2008 DataCenter - Amazon hosting) - and only in IE 10 - the website is NOT displayed correctly - spacing is sometimes wrong, background colors sometimes disappeared, links not working properly, padding/margin is missing in some of the places and more... - it seems like the styles/CSS are partial... On other browsers (Chrome/FireFox/IE9) - it is displayed correctly (as intended)
I've tried to add the compatibility meta tags to IE=9 - didn't work (by the way, in IE10 - if I open the F12 tool - and change the Browser Mode to IE9 - it works!, but if I just change the Document Mode - it doesn't seem to help)
Why is Internet Explorer 10 evil??? Has anyone encountered this issue? any suggestions?
Thanks a lot! :)
As you write you are using F12 tools. My experience is that with Developer Tools running IE10 often does not apply all CSS rules (especially in at the end of external files). Refreshing the page or closing F12 tools usualy solves the problem. Also if you know which style is not applied it helps to disable and enable it again.
i have passe through a similar situation and some things just don't stay they way i want in every browser, so perhaps the better way out is to create CSS hacks tos specific spacing or styling issues you may have encoutered.
http://www.impressivewebs.com/ie10-css-hacks/
After a lot of searching and frustration, I've found the solution to my problem (here: http://www.nuget.org/packages/App_BrowsersUpdate)
Apparently the website should be updated to allow IE10 compatibility...
In your solution - install the ASP.NET Browser Capabilities Update using the following command in the "Package Manager Console" (can be started from "Tools"->"Library Package Manager" in your VS):
Install-Package App_BrowsersUpdate
(this will add ".browser" files to your website and few lines in your "web.config" file)
Rebuild and re-deploy your website and that's it! now my deployed website looks as intended on IE10!
(I still don't understand why it worked correctly on my localhost and not on the web server but at least the problem is solved)

Strange display behavior with IE8 on localhost vs dev server

Just started a site, using standard html/css - nothing fancy. Just divs to create a framed look. The server code is asp.net (4.0).
When I debug the program locally out of visual studio 2012, the page looks exactly as I designed it in all of my browsers (ie8/ff/chrome). When I publish it to my dev server and open it in IE8, the layout is messed up (i.e, my login box is now at bottom of page instead of center). However, if I open that same page on the dev server with firefox or chrome, it looks correct.
I've tried deleting all the files and republishing. I've viewed the source behind both the working (localhost) and broken (dev server) and it is identical.
Any ideas or additional troubleshooting steps I can try?
Thanks.
Edit:
Screenshot: http://i.imgur.com/tNiIFCz.png (side by side of dev vs localhost)
Masterpage: http://pastebin.com/c94Pinih
Css: http://pastebin.com/Txtac3kw
Login page: (the page that is messed up in IE8): http://pastebin.com/BN5bBamP
You could try:
make sure all of your resources are being loaded correctly (IE8 can do this, but other tools are available)
validating HTML/CSS
checking your render modes locally vs in production. If this is the issue, you can probably use the X-UA-Compatible meta tag to force a specific version of the IE render engine.
checking for any page/script errors
checking that the source in production matches the source when viewed locally
checking differences between IIS
Also by "standard html/css", I assume this is HTML4/CSS2? Do you have a link to check out?
Removed the top level div and it worked. Still not sure why it worked in ie8 on the local box, but not the dev box.

2 servers, same website on both: IE shows two slightly different version

I'm getting a weird issue involving IIS and IE, and I'll try to describe it clearly.
I have a regular html-css-js/jquery website that I've developed locally. Now that it's ready, I'm trying to deploy it on a server.
Once it's hosted on the server, I see two problems in IE only:
The rendering is slightly different: there's a few pixels of additional white space all around my website (so the contents is actually more 'compressed' than when viewed locally).
Some JS issues: I'm using the Impromptu jQuery popup plug-in, and the callback I specify in its 'loaded' event pre-populates its forms fields. In FF it works, but in IE the fields don't get populated until I close the popup and open it again. This worked locally on all browsers.
As weird as it sounds, the text in my jQuery popup dialog does not seem to have the 'ClearType' technology applied. The text is like '1 pixel thin' and not anti-aliased like everywhere else.
I have uploaded my website to another server and it runs perfectly fine. The issue is that I need to put it on the first server and I don't know what's wrong. Both servers are on Win 2k3 with IIS 6, .NET 3.5.
Any pointers as to what is going wrong? Thanks a lot.
Make sure that the "security zone" in the Internet Explorer status bar is the same when viewing the site between the 2 servers.
Use the IE developer toolbar to debug your css. Could also be a caching issue if it looks like an older version.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=95e06cbe-4940-4218-b75d-b8856fced535

CSS renders differently on web server than on development environment

I have this problem where the web application that I have created in my development environment, displays differently after I upload it to the web server.
I am using the same browser and the same machine to view the pages. The only thing different, is the "server". I am using .net 3.5 and on my development environment the pages are served using the ASP.net Development Server. On the web server, the pages are served using IIS 6.0.
I have only a single CSS file that is contained within the "App_Themes/Default" folder that is used to control all the CSS in my application.
Here are some of the things that don't display the same:
1) I have a collapsible panel control that when expanded is supposed to show on top of all the other page elements. On the dev environment, it behaves correctly. On the web server, the panel slides underneath the other elements.
2) I have my element defined with a background and a certain font size. When displayed on my development environment, the text displays on one line. However, on the web server, the text is wrapped even though the text is the same size. It's as if the containing div is somehow rendered "smaller".
3) The width of buttons that do not have a fixed width (so the width is determined by the button text) is different between the development environment and the web server. The bottons on the server are always wider.
I checked to make sure there are no references to other CSS elements in the machine.config and global web.config on the server and on my development environment.
I know the server is reading from the CSS because in general, it looks similar (same colors, backgrounds, font style, etc). It's just that the sizes seems to be off and the layering of the divs.
Has anyone run in to this problem before? Any ideas of what I could look for?
Looks like you are comparing them in Internet Explorer 8. Microsoft introduced different rendering modes for local and Internet servers so that web developers would break down in tears.
If there’s no X-UA-Compatible value and site is in
Local Intranet security zone, it will be rendered
in EmulateIE7 mode by default.
Add X-UA-Compatible header or META to force full IE8 standards mode.
See also http://sharovatov.wordpress.com/2009/05/18/ie8-rendering-modes-theory-and-practice/
We were having an issue with compatibility modes too, so I ended up just adding:
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
Since I knew it worked fine in IE7, 8, and 9.
I had the same problem in Google Chrome. Apparently media queries get messed up if the page is zoomed in or out. Make sure your zoom level is 100% for both sites.
This at least sounds like that the production server added a xml declaration to the HTML or changed the doctype which caused the page being rendered in non-standards-compliant mode. This is also known as quirks mode, you see this very good back in MSIE. The symptoms which you described are recognizeable as box model bug in MSIE.
Rightclick the pages and check the HTML source. Are they both exactly the same? (including meta tags, xml declaration, whitespace, etc)
If you're FTP'ing from Windows to Linux, please ensure that you're transferring in binary mode to ensure that the whitespace (spaces, linebreaks) remain unchanged. Also ensure that you're saving documents as UTF-8 (or at least ISO-8859-1) and NOT as MS-proprietary encoding such as CP1252.
For those of you that are having this problem in an Intranet site setting the meta tag won't fix the problem if "Display intranet sites in Compatibility View" is checked on (which it is in a lot of cases)
You have to send the HTTP response header at the server level, see here
The CSS that is coming from the server may be a older cached version - try refreshing the page using Ctrl+F5 so it get re-requested.
For me, Internet Explorer's Compatibility View Settings was the issue:
After the check-boxes were un-set, the CSS renders perfectly
We had the same issue, fixed on IE9 & IE11 with this:
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
</head>
Juste add this to your web.config file :
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=8" />
</customHeaders>
</httpProtocol>
</system.webServer>
I had the same issue. Our network uses Win7 with IE11 throughout. For me the solution was to, on my local machine adding "localhost" to the list in IE's compatibility settings > "Websites you've added to compatibility View". IE > Tools > Compatibilty View settings.
BTW our NA has every machine setting IE11 to "Display intranet sites in Compatibility View" automatically checked by a group policy.
This often happens to me when the 'server' version is cached somehow. Refreshing did the trick. Throwing away 'temporary internet files' does it, too.
I just had this problem. I'd changed my style sheet and HTML code. It looked great on locally but didn't work on the server. I found that in Visual Studio the CSS file's "Copy to Output Directory" was set to "Do not copy". So my CSS updates were not getting deployed. Sometimes the problem is just user error.
Can be caused by minification, e.g. on dev machine you have
<span>AAA</span>
<span>BBB</span>
but on remote server it becomes
<span>AAA</span><span>BBB</span>
and a space between them gets lost.
try this,.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />

Resources