0

This is not a duplication question. The answers on the following duplicate question doesn't work for IE 9.

How to prevent IE9 from rendering intranet sites in compatibility mode

I have an asp.net website that displays in Compatibility mode when visited from intranet network on Internet Explorer 9. I have searched for the solutions for two days and couldn't find any working solution. On Compatibility View settings window of internet explorer the intranet sites are checked to display in compatibility view. If I uncheck the setting then the problem is solved but I don't want to uncheck this settings. All over internet it is suggested that if I use valid doctype and meta tag then we can overwrite this settings. But unfortunately I couldn't display my site without compatibility view in internet explorer 9. Following is the code of my aspx page

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DocTypeTest.aspx.cs" Inherits="PasswordFieldDemo.DocTypeTest" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body>
<h1> Hello World </h1>
</body>
</html>

There you can see that I have added meta tag and this right after head. I have also set the following on web.config file.

<configuration> 
<system.webServer> 
    <httpProtocol> 
        <customHeaders> 
            <add name="X-UA-Compatible" value="IE=edge" /> 
        </customHeaders> 
    </httpProtocol> 
</system.webServer> 
</configuration>

I have also tried to update the http response and that didn't solve the problem as well. I have tried every single solution suggested on internet but couldn't fix the problem. Even I replicated this issue with a simple html file.

The browser mode for my site is Internet Explorer 9 Compatibility View and document mode is IE9 Standards. How can I display my website's browser mode as on Internet Explorer 9 (not as compatibility view)? Thanks for your help.

Community
  • 1
  • 1
user1814131
  • 249
  • 3
  • 14
  • So many stackoverflow question's answers are claiming this is pretty much possible for internet explorer 9 without changing the browser configuration. Following urls can be checked : [link](http://stackoverflow.com/questions/12894082/how-to-prevent-ie9-from-rendering-intranet-sites-in-compatibility-mode) [link](http://tesmond.blogspot.com/2011/10/ie9-intranet-compatibility-mode-in.html) [link](http://frankcode.net/2013/10/17/a-guide-to-ie-compatibility-view-and-x-ua-compatible/) [link](https://hsivonen.fi/doctype/) – user1814131 May 18 '15 at 13:53
  • I have tried all the approaches provided on the duplication question (How to prevent IE9 from rendering intranet sites in compatibility mode ) . None of the solutions work – user1814131 May 18 '15 at 14:01

0 Answers0