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

Discussion in 'ASP .Net' started by Nathan Sokalski, Oct 11, 2008.

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

    http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx

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

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <system.webServer>
    <httpProtocol>
    <customHeaders>
    <clear />
    <add name="X-UA-Compatible" value="IE=EmulateIE7">
    </customHeaders>
    </httpProtocol>
    </system.webServer>
    </configuration>

    When I tried to add this code using Visual Studio 2005, IntelliSense did not
    seem to include the <httpProtocol> tag 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
    <httpProtocol> tag? 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=EmulateIE7">
    Is missing the self-closing slash and should be:
    <add name="X-UA-Compatible" value="IE=EmulateIE7" />
    Since XML is strict about this, I just wanted to point it out.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
    Nathan Sokalski, Oct 11, 2008
    #1
    1. Advertising

  2. On Oct 11, 6:54 am, "Nathan Sokalski" <> wrote:
    > On Microsoft's page about IE8 and Defining Document Compatibility at:
    >
    > http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx
    >
    > They give the following code to add to Web.config:
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <configuration>
    >   <system.webServer>
    >     <httpProtocol>
    >       <customHeaders>
    >         <clear />
    >         <add name="X-UA-Compatible" value="IE=EmulateIE7">
    >       </customHeaders>
    >     </httpProtocol>
    >   </system.webServer>
    > </configuration>
    >
    > When I tried to add this code using Visual Studio 2005, IntelliSense did not
    > seem to include the <httpProtocol> tag 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
    > <httpProtocol> tag? 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=EmulateIE7">
    > Is missing the self-closing slash and should be:
    > <add name="X-UA-Compatible" value="IE=EmulateIE7" />
    > Since XML is strict about this, I just wanted to point it out.
    > --
    > Nathan Sokalski
    > ://www.nathansokalski.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.
    Alexey Smirnov, Oct 12, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad
    Replies:
    5
    Views:
    1,406
  2. rockdale
    Replies:
    1
    Views:
    578
    Juan T. Llibre
    Aug 23, 2006
  3. Alexander Dong Back Kim

    Compatible codes for both Visual Studio 2005 and gcc

    Alexander Dong Back Kim, Sep 23, 2007, in forum: C++
    Replies:
    12
    Views:
    532
    Ian Collins
    Sep 24, 2007
  4. jonny
    Replies:
    1
    Views:
    456
    Michael Nemtsev
    Oct 6, 2007
  5. Replies:
    3
    Views:
    210
    Mike Brind
    Oct 16, 2007
Loading...

Share This Page