ASP.NET on .NET 4 causing IE11 throw _doPostBack is undefined javascript error

frogcoder picture frogcoder · Nov 5, 2013 · Viewed 19k times · Source

Edit: The site is on Windows Server 2003, hence cannot be upgraded to .NET framework 4.5.

Our web site is serving ASP.NET ON .NET 4. When using IE 11 the auto postback stopped working with the error "_doPostBack is undefined". It's very likely can be fixed with some modification to the browser definition file, which I don't know how yet.

Microsoft suggests feature detection (preferred), or changing the browser definition file. http://msdn.microsoft.com/en-us/library/IE/hh869299%28v=vs.85%29.aspx

It looks like feature detection means dropping auto postback all together. Isn't that just like rewriting the whole site?

Can someone describe how to accomplish both feature detection and browser definition file modification? Which way is preferred and why.

The accepted answer solved the problem, seems like it's the only way if you are stuck on server 2003. It would be really really nice if someone could explain how feature detection could be done without massive code changes.

Answer

Jiayun Zhou picture Jiayun Zhou · Nov 8, 2013

It seems that Windows Server 2003 needs a server-wide solution and all hotfixes didn't work, so it must be done manually.

  1. Edit C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Config\Browsers and add the browser definition in this answer https://stackoverflow.com/a/19203518/1297563
  2. Run c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regbrowsers.exe -i
  3. Restart IIS