How Do I Change The 'Document Mode' Of Ie In Web Config for IIS 6

Tharani Santhanam 0 Reputation points
2023-03-01T04:31:16.9633333+00:00

Hi,

In order to change the Document mode of IE in web config for my web application which is in IIS6.I have checked the below option which is adding the code using meta tag

<meta http-equiv="x-ua-compatible" content="edge">

It doesn't overrides my local compatibility settings.

i have checeked other options like adding code below <system.webserver>.But it will be working only for IIS7.

<configuration>
  <system.webserver>
    <httpprotocol>
      <customheaders>
        <clear />
        <add name="X-UA-Compatible" value="edge" />
      </customheaders>
    </httpprotocol>
  </system.webserver>
</configuration>

Can you please provide me the solution(Code) to change the Document mode(override the local compatibility settings) for IIS6

Thanks,

Tharani Santhanam.

Windows development Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. Yurong Dai-MSFT 2,846 Reputation points Microsoft External Staff
    2023-03-01T09:11:57.52+00:00

    Hi @Tharani Santhanam,

    Adding code <add name="X-UA-Compatible" value="edge" /> in web.config, this method of setting "Custom HTTP Headers" only works for IIS7 and higher versions. IIS6 cannot read this configuration element.

    "IIS 6.0 replaces MetaBase.bin with two XML files named MetaBase.xml and MBSchema.xml. These files are stored on your computer in the systemroot\System32\Inetsrv folder. Only users who are members of the Administrators group can view and modify these files. The metabase configuration file, MetaBase.xml, stores most of the IIS configuration. Some IIS configuration values are also stored in the Windows registry. If a configuration value is one that you might need to configure or change, or if you can access the setting in the IIS 6.0 user interface, then the setting is typically stored in the IIS metabase."

    Please try manually editing the setting "Custom HTTP Headers" using IIS6 Manager:

    Open IIS Manager, right click on the website select Properties, select the tab HTTP Headers, and add the custom header "X-UA-Compatible: edge".

    In addition, the product version you are using has ended its life cycle and is no longer supported; it is recommended that you use a newer version of the product for better security and stability and support services provided by Microsoft.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.

    Best regards,

    Yurong Dai

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.