ASP.NET ignores IE7 compatibility tag in Web.config

I have the following section in my web.config file

<system.webServer>
    <!-- For now..... lets be safe and put IE8 in IE7 compatibility mode-->
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=EmulateIE7" />
      </customHeaders>
    </httpProtocol>
</system.webServer>

but

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

missing from the page title when they appear on my site. I followed the advice in this post ASP.NET Application - Set IE7 Compatibility Mode? but it does not seem to work properly using IE8 and IIS6. Any clues?

+4
source share
1 answer

, , IIS6. IIS6 <system.web> Web.config <system.webServer> ( IIS7, ). IIS6, , - MasterPage. OnPreRender MasterPage:

Page.Header.Controls.AddAt(0, new HtmlMeta { HttpEquiv = "X-UA-Compatible", Content = "IE=EmulateIE7" });

, AddAt Add, , X-UA-, -, , .

, - !

+14

All Articles