3

I have an intranet site that loads in IE7 compatibility mode, unless the user has unchecked "Display intranet sites in Compatibility View" on their version of IE8. Unfortunately, the client wants this checked for other sites that they use, so I need to override this setting. I've tried the meta tag,

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

but it does not override the browser setting. However, this question indicates that a server heading will indeed override. This is the example code given in the top answer:

<httpProtocol>
  <customHeaders>
    <clear />
    <add name="X-UA-Compatible" value="IE=edge" />
  </customHeaders>
</httpProtocol>

I've opened up web.config and put it in <system.webServer> but it doesn't work. I'm watching the headers with fiddler but it isn't adding the header at all. (Also, it still is forced to compatibility mode and Javascript confirms documentMode is 7.) I'm working locally with the ASP.NET Development Server

Community
  • 1
  • 1
brentonstrine
  • 21,694
  • 25
  • 74
  • 120
  • 2
    This is one of the reasons to not use cassini. Go get IIS 7.5 express: http://www.microsoft.com/en-us/download/details.aspx?id=1038 – NotMe Jun 20 '12 at 22:27

1 Answers1

2

The <system.webServer> tag is specifically for IIS (7, I believe). It won't affect the Cassini server that Visual Studio uses in-house. If you only need to worry about this issue in a live dev environment, try testing on an instance of IIS. Otherwise, you may want to try IIS Express in development.

NotMe
  • 87,343
  • 27
  • 171
  • 245
StriplingWarrior
  • 151,543
  • 27
  • 246
  • 315
  • I don't understand how the meta tag you suggested is different from the meta tag in my question which I pointed out does not work. – brentonstrine Jun 20 '12 at 22:12