2

Often during debug of server-side VB.NET/C# code that is executed inside of ASP.NET partial postack (UpdatePanel, other controls with AJAX behaviors) I am getting this client-side error:

Debug error

At this point I do not care about client-side (and at runtime this is not happening). It's just a major annoyance during debug - is there a way to prevent it?

Yuriy Galanter
  • 38,833
  • 15
  • 69
  • 136
  • 2
    possible duplicate of [ASP.NET UpdatePanel Time Out](http://stackoverflow.com/questions/158975/asp-net-updatepanel-time-out) – SLaks Jul 23 '13 at 19:15

1 Answers1

5

This happens when you have an ASP ScriptManager for AJAX processing. That control has a default Async PostBack timeout of 90 seconds, after which it will throw this exception.

The solution is rather simple: Add an ASP tag during debug to extend the timeout for as long as a debug session might take you:

<asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="3600">
</asp:ScriptManager>

The above will let me run a debug session for one hour before throwing that exception. Don't forget to remove that tag for your production releases, or a hung loop etc, will never time out.

Jeff

Jeff Woods
  • 360
  • 3
  • 9