7

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.

frogcoder
  • 963
  • 1
  • 7
  • 17

4 Answers4

6

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
Community
  • 1
  • 1
Jiayun Zhou
  • 111
  • 2
  • 5
3

Upgrade your .NET Framework to 4.5

Once installed run the command:

aspnet_regbrowsers -i
Karl Glennon
  • 3,149
  • 4
  • 29
  • 31
2

@FrogCoder

I came across this problem yesterday - and the patch 2836939 solved my issue. Windows 8.1 IE11.

Please consider the following from the Hotfix URL:

"Note If you run the ASP.NET browser registration tool (Aspnet_regbrowsers.exe) after you install the update, the old behavior will return."

http://support.microsoft.com/kb/2836939

Hope this helps.

1

Place below script in your master page will fix it. i had a similar issue and got fixed.

<script runat="server">

protected override void OnInit(EventArgs e)
{
Page.ClientTarget = "uplevel";
base.OnInit(e);

}
</script> 
vishal
  • 233
  • 4
  • 7
  • Tried absolutely everything (hotfixes etc), this is the only thing that worked for me. Is it possible to configure that on IIS side instead of writing code? On the other server, this bit of code is not there and everything is working fine... – Borissov Jun 10 '17 at 15:25