Wednesday, 28 November 2012

A hotfix for the ASP.NET browser definition files in MS .NET Framework 4.0

This post describes a hotfix for the ASP.NET browser definition files that are included in the Microsoft .NET Framework 4.0.

This blog is mainly for the ASP.NET developer's who are all using IE 10 and Mozilla Firefox 4.0 or a later version of Mozilla Firefox  browser's.The following are 2 Issue's so far and you can get the current fix from MSFT.


Issue 1

Consider the following scenario:
  • You use Windows Internet Explorer 10 to access an ASP.NET-based webpage.
  • The webpage starts a postback.

In this scenario, the postback fails, and you receive the following error message:
Script Error encountered", "'__doPostBack' is undefined
Note The webpage can start a postback in various ways. For example, a LinkButton control can start a postback.

Issue 2

Consider the following scenario:
  • You create an ASP.NET-based webpage that has the MaintainScrollPositionOnPostBack attribute set to True.
  • You use Mozilla Firefox 4.0 or a later version of Mozilla Firefox to open the webpage.
  • The webpage starts a postback.

In this scenario, the scroll position of the webpage is not maintained after postback.



This hotfix introduces updated definitions in the browser definition files for Internet Explorer and for Mozilla Firefox. 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 4.0
    %WinDir%\Microsoft.NET\Framework\v4.0.30319\CONFIG\Browsers

  • For 64-bit versions of the .NET Framework 4.0
    %WinDir%\Microsoft.NET\Framework64\v4.0.30319\CONFIG\Browsers
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. For example, ASP.NET cannot recognize Windows Internet Explorer 10 that has the following user agent string:

Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)

This hotfix is intended to correct only the problem that describedabove. Apply this hotfix only to systems that are experiencing the problem described the same

After you apply this hotfix, you might have to restart the computer if any affected files are being used when you install this hotfix. 
To avoid a restart of the computer, shut down all web server applications for ASP.NET websites before you apply this hotfix.

Note : This hotfix does not replace a previously-released hotfix.

Courtesy : Microsoft

Thanks & Regards
Prabhakaran Soundarapandian

No comments:

Post a Comment