For sites that require Flash or ActiveX controls in Windows 8

Posted by Joel Varty on November 26, 2012 | Comments (0)

If you have a Flash control, or an ActiveX control on your site, you may want to direct Internet Explorer usersWindows 8 to the Desktop version of the browser, this is how you do that.

First things first - read the MSDN documentation on this - you can find it here: Get ready for plug-in free browsing (Internet Explorer)

For Agility, you won't be able to put in a META tag in the META section of an Agility Page Properties - you'll have to do it in website code, as it only works if it's the first piece of code in the HEAD tag.  In practice, it's much better to put this logic into a real HTTP response header.

In C# code, it looks like this:

Response.AppendHeader("X-UA-Compatible", "requiresActiveX=true");

If you want to have the above message displayed on ANY page in your site, put this code in the Application_BeginRequest event of the Global.asax.  Otherwise, you should put in code that will be executed for the appropriate Module or Page Template.

Remember too, this value can be added in the IIS Settings for the website, but you should avoid this, as the setting can easily be missed when moving the site to a new server.

Also, this setting conflicts with any IE7 or IE8 compatibility setting.  Only one X-UA-Compatibility header is allowed in a given HTTP response.


Comments (0)



Submit

LOGIN

Log in with your Agility username and password or
register for the site




Log In

REGISTER












Register

FORGOT PASSWORD