ASP.NET fails to detect IE10 causing _doPostBack is undefined JavaScript error or maintain FF5 scrollbar position

There is a bug in the browser definition files that shipped with .NET 2.0 and .NET 4, namely that they contain definitions for a certain range of browser versions. But the versions for some browsers (like IE 10) aren't within those ranges any more. Therefore, ASP.NET sees them as unknown browsers and defaults to a down-level definition, which has certain inconveniences, like that it does not support features like JavaScript.

The following fixes solve the browser-detection issue forever for all sites on a machine. These will be rolled up into future versions of the framework and will eventually also be on Windows Update.

[EDIT]

If you don't want to install those hotfixes on a production system, then you can create an App_Browsers folder under your website root directory and put the following browser config files on it.

  1. You can also update your entire machine's browser files.
  2. Copy the files from the .\machines folder into \Windows\Microsoft.NET\Framework\v4.0.30319\Config\Browsers, overwriting your previous versions 
  3. Open a command prompt and run \Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regbrowsers.exe -i 
  4. Restart IIS (e.g., with iisreset)

Commentaires

Anonyme a dit…
Thank you. This info has been a life saver. Keep up the good work !.