And get ASP.NET to recognize the IE10 user agent string

Sep 6, 2011 15:34 GMT  ·  By

A hotfix available for download from Microsoft is designed to kick Internet Explorer browser definition files in the .NET Framework 2.0 SP2 and in the .NET Framework 3.5 SP1 up a notch in order to make ASP.NET recognize the latest browser releases, including Internet Explorer 10. Users need to be running one of the following operating systems in order to apply the fix: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7 Service Pack 1 (SP1), Windows Server 2008 R2 Service Pack 1 (SP1).

As some users might be aware of, IE10 will only be supported on Windows 7 and Windows 8. But the actual presence of the next version of IE on a Windows OS is irrelevant since the hotfix targets .NET 2.0 SP2 and.NET 3.5 SP1, updating the ASP.NET browser definition files.

“By default, ASP.NET uses sniffing technology for the user agent string to detect browsers. The browser definition files cover a certain range of browser versions. However, as the version numbers increase, ASP.NET might not recognize new versions of a browser by using the user agent string. In this case, ASP.NET might handle these versions as an unknown browser,” Microsoft explained.

One of the browsers that can risk not being identified is Internet Explorer 10. The user agent string for IE10 is Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0).

IE10 is available to early adopters for testing as Platform Preview 2 release. So far, only the core of IE10 has been offered to testers.

“This hotfix introduces updated definitions in the browser definition file for Internet Explorer. The browser definition files are stored in one of the following folders, depending on the installed version of the Microsoft .NET Framework:

For 32-bit versions of the .NET Framework 2.0 SP2 or of the .NET Framework 3.5 SP1 - %WinDir%\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers;

For 64-bit versions of the .NET Framework 2.0 SP2 or of the .NET Framework 3.5 SP1 - %WinDir%\Microsoft.NET\Framework64\v2.0.50727\CONFIG\Browsers,” Microsoft added.

Internet Explorer 10 (IE10) Platform Preview 2 (PP2) Build 10.0.1008.16421 is available for download here.

Windows Internet Explorer 9 RTW for Windows 7 and Windows 7 SP1 is available for download here.