What is the simpliest way to set the IE7-Compatibility Mode mode in an ASP.NET application to deal with IE8 issues? Is it possible to set this via the web.config or must it either be set at the IIS or page level?
+5
A:
Add the header
X-UA-Compatible: IE=EmulateIE7
in the HTTP Headers tab of the site or application properties in IIS manager. In IIS7 its the HTTP Response Headers feature.
You can place it the <system.webServer>
section of a web.config
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=EmultateIE7" />
</customHeaders>
</httpProtocol>
AnthonyWJones
2009-04-03 11:44:33
Thanks, so this can just be added to web.config on an app by app basis as needed correct?
schooner
2009-04-03 13:18:31
yes but since you can configure this at application or folder level in IIS manager I prefer to use IIS manager on IIS6 (on IIS7 its all the same). For a pure ASP.NET app either way should be fine.
AnthonyWJones
2009-04-03 13:35:56
A:
You can use META tags to influence IE8 to set its mode accordingly:
Program.X
2009-04-03 11:45:07
+1
A:
If the solution posted here did not work for you, see my question and answer here http://stackoverflow.com/questions/1209183/asp-net-ignores-ie7-compatibility-mode-tag-in-web-config/
Chris Shouts
2009-07-31 13:07:39
A:
Instead of value="IE=EmultateIE7"
Replace with value="IE=EmulateIE7"
David Martin
2010-07-14 14:30:28