ASP.NET UpdatePanel Time Out ASP.NET UpdatePanel Time Out asp.net asp.net

ASP.NET UpdatePanel Time Out


There is a property on the ScriptManager which allows you to set the time-out in seconds. The default value is 90 seconds.

AsyncPostBackTimeout="300"


In my case the ScriptManager object was created in a Master Page file that was then shared with the Content Page files. So to change the ScriptManager.AsyncPostBackTimeout property in the Content Page, I had to access the object in the Content Page's aspx.cs file:

protected void Page_Load(object sender, EventArgs e){     . . .      ScriptManager _scriptMan = ScriptManager.GetCurrent(this);     _scriptMan.AsyncPostBackTimeout = 36000;}


This did the trick (basically just ignoring all timeouts):

<script type="text/javascript">         Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function (sender, args) {             if (args.get_error() && args.get_error().name === 'Sys.WebForms.PageRequestManagerTimeoutException') {                             args.set_errorHandled(true);             }         });     </script>