X-UA-Compatible, Web.config, and Visual Studio 2005

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nathan Sokalski

    X-UA-Compatible, Web.config, and Visual Studio 2005

    On Microsoft's page about IE8 and Defining Document Compatibility at:



    They give the following code to add to Web.config:

    <?xml version="1.0" encoding="utf-8"?>
    <configuratio n>
    <system.webServ er>
    <httpProtocol >
    <customHeader s>
    <clear />
    <add name="X-UA-Compatible" value="IE=Emula teIE7">
    </customHeaders>
    </httpProtocol>
    </system.webServe r>
    </configuration>

    When I tried to add this code using Visual Studio 2005, IntelliSense did not
    seem to include the <httpProtocolta g as part of the schema. I was able to
    type it in completely by hand, which since it is such a small section is not
    a problem (I'm not lazy, this is just a question out of curiosity and
    attempt to make something work correctly). I'm assuming it will work
    correctly whether IntelliSense helped me or not, since Visual Studio did not
    give me any errors. Why is IntelliSense not letting me know about the
    <httpProtocolta g? Thanks.

    NOTE: I don't know if anybody else noticed (and obviously Microsoft didn't,
    since it still isn't fixed on the page I mentioned), but the line:
    <add name="X-UA-Compatible" value="IE=Emula teIE7">
    Is missing the self-closing slash and should be:
    <add name="X-UA-Compatible" value="IE=Emula teIE7" />
    Since XML is strict about this, I just wanted to point it out.
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。



  • Alexey Smirnov

    #2
    Re: X-UA-Compatible, Web.config, and Visual Studio 2005

    On Oct 11, 6:54 am, "Nathan Sokalski" <njsokal...@hot mail.comwrote:
    On Microsoft's page about IE8 and Defining Document Compatibility at:
    >

    >
    They give the following code to add to Web.config:
    >
    <?xml version="1.0" encoding="utf-8"?>
    <configuratio n>
      <system.webServ er>
        <httpProtocol >
          <customHeader s>
            <clear />
            <add name="X-UA-Compatible" value="IE=Emula teIE7">
          </customHeaders>
        </httpProtocol>
      </system.webServe r>
    </configuration>
    >
    When I tried to add this code using Visual Studio 2005, IntelliSense did not
    seem to include the <httpProtocolta g as part of the schema. I was able to
    type it in completely by hand, which since it is such a small section is not
    a problem (I'm not lazy, this is just a question out of curiosity and
    attempt to make something work correctly). I'm assuming it will work
    correctly whether IntelliSense helped me or not, since Visual Studio did not
    give me any errors. Why is IntelliSense not letting me know about the
    <httpProtocolta g? Thanks.
    >
    NOTE: I don't know if anybody else noticed (and obviously Microsoft didn't,
    since it still isn't fixed on the page I mentioned), but the line:
    <add name="X-UA-Compatible" value="IE=Emula teIE7">
    Is missing the self-closing slash and should be:
    <add name="X-UA-Compatible" value="IE=Emula teIE7" />
    Since XML is strict about this, I just wanted to point it out.
    --
    Nathan Sokalski
    njsokal...@hotm ail.comhttp://www.nathansokal ski.com/
    ASP.NET is not mentioned in the article, I think it might be about
    root web.config from \win\microsoft .net\framework\ version\config

    The httpProtocol element is for IIS 7.0 and it didn't included in the
    schema for .NET 2.0. In VS.NET 2008 I have to create a .NET 3.5
    application to make the IntelliSense working with that element.

    Comment

    Working...