Forcing document mode compatibility for IE: ASP.NET application talking to CRM 2013

Recently we faced an issue on ASP.NET application talking to CRM 2013, where document mode was always needed to be set to IE 9 in order for the UI elements and website controls to work properly. So, was digging on it and found the following way of doing it, add this to web.config:

<system.webServer>

<httpProtocol>

<customHeaders>

<clear />

<add name=”X-UA-Compatible” value=”IE=9″ />

</customHeaders>

</httpProtocol>

</system.webServer>

Following are possible values (referred from MSDN):

X-UA-Compatible value

Document modes

IE=5

Quirks mode

IE=7

IE7 mode

IE=8

IE8 mode

IE=9

IE9 mode

IE=10

IE10 mode

IE=11

IE11 mode

IE=edge

The highest supported document mode of the browser

IE=EmulateIE7

IE7 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

IE=EmulateIE8

IE8 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

IE=EmulateIE9

IE9 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

IE=EmulateIE10

IE10 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

IE=EmulateIE11

IE11 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

Hope it helps!

Advertisements

4 thoughts on “Forcing document mode compatibility for IE: ASP.NET application talking to CRM 2013

  1. I am experiencing a similar issue.

    We are viewing a CRM 2011 Site using IE10 (which has to have Compatibility mode enabled for the Javascript to work – as well for many other intranet sites). Enabling this compatibility mode forces IE10 to use “Document Mode = IE7 Standards”.

    My problem is then that “IE7 Mode” limits all text boxes to 2000 characters. Using Developer Tools to change the document mode to IE8 or above allows the user to enter more that 200 characters (up to the character limit set in the entity’s field).

    The answer, then, seemed simple – force all CRM pages to be in IE8 Compatibility mode. To that end, I followed the instructions above and made amendments to the web.config file (or through the Site settings within IIS).

    This appears to have had NO EFFECT. Using Developer Tools, the “Original Source” contains the meta tag: , and the Document Mode = “IE7 Standards”.

    Our CRM 2011 site has the “Load pages in most recent version of Internet Explorer” UNCHECKED – this is because we use javascript that will not work if this option is checked.
    Am i right in thinking that unchecking this option essentially adds the above META tag for all PAGES in the site, and therefore overrides any settings in the web.config file?

    Saying that, If check this option and reload the page, IE Developer Tools states that the Document Mode is “Standards” and not the “IE8” that I specified in the web.config file – so it seems that something in the CRM 2011 site is overriding whatever value is set in the CRM site settings in IIS (v7).

    Does CRM 2011 have a different place for dictating the Document Mode? Or do we only have the choice between IE7 mode and “Standards” mode (which I believe is either IE9 standards, or the standards for the current version – i.e. IE10)?

    Does anyone know how I can force all clients to use IE8 for the document mode?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s