locked
Custom HTTP Headers for IIS 6 RRS feed

  • Question

  • User-1535262787 posted

     Hi,

    Is there any way to override/add the Custom HTTP Headers [for IIS 6] through web.config file.

    For Instance, I'm looking for something like this.

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

    The above parameters, system.webServer, is supposed to be for IIS 7.

    Can something similar be done for IIS 6.

    If I use the same code as above, it is not picking up the values.

    If I change it through UI, it works.

    Any help is appreciated.

    Thanks,

    Tuesday, June 21, 2011 7:12 AM

Answers

  • User744767459 posted

    Hi,


    The above parameters, system.webServer, is supposed to be for IIS 7.
    Can something similar be done for IIS 6.
    If I use the same code as above, it is not picking up the values.
    If I change it through UI, it works.

    Unfortunately, this feature is not supported in IIS6.

    "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."

    You'll need to Edit metabase manually, by using IIS Manager, or edit it programmatically. Thanks.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, June 27, 2011 5:27 AM