Windows Phone 7 Developer Launch - Learn More
kick it on DotNetKicks.com   Shout it  

ASP.NET AJAX - Update Panel Timeout

When using the asp:UpdatePanel server control for asyncronous communication with the web server the default timeout is 90 seconds. For some processes this may not be long enough.

For example, I am currently working on a reporting application and at the moment I have to query a table with over 36 million records. Some queries take longer than 90 seconds. But unfortunately I had trouble finding out how to extend this.

It turns out that this is a page-level setting. The asp:ScriptManager server control has a property named AsyncPostBackTimeout. Set this value to the number of seconds you need to resonably run the process in question and you'll be fine.

<asp:scriptmanager id="scriptManager1" runat="server" enablepartialrendering="true" asyncpostbacktimeout="1000"></asp:ScriptManager>


Feedback

# 

Gravatar Is the number indicated for the AsyncPostBackTimeout attribute in seconds or milliseconds? 8/5/2008 5:22 AM | noreply@blogger.com (Anonymous)

# 

Gravatar The value is in seconds. So in my example, 1000 would be 16 minutes 20 seconds.

If a process takes that long you'll most likely need to look at an alternative to setting the timeout so long. I was able to go back and bring the result way down, but the first step was to get it working, so I just cranked the timeout way up. Now the process runs in under a minute worst case scenario. 8/5/2008 8:27 AM | noreply@blogger.com (Mark J. Miller)

Comments have been closed on this topic.
 

 

Copyright © Mark J. Miller