I have a small web application written in ASP.net 2.0 (works on 3.5 as well) with Ajax enabled. What it does is to search information on a online database and downloads as PDF. I use <asp:UpdatePanel></asp:UpdatePanel> to wrap up the web form content, and use <asp:UpdateProgress> to show a modal popup type of progress icon during the actual download.
It works great except when the PDF is bigger than a few megabyte this nice Ajax type of progress modal disappears without any results returning to the content in the UpdatePanel. I scratched my head many times without any luck finding it why, until I fired up Firebug in my Firefox and tried again the same process. Bingo. the following error was thrown out in Firebug console.
Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out
Searching for Sys.WebForms.PageRequestManagerTimeoutException brought me to this page on ASP.net forum, in which a poster explained very well what it is and how to solve it.
For Sys.WebForms.PageRequestManagerTimeoutException, check here and here for what it is.
To solve this problem we can increase the timeout. You can change the timeout time by adding a new property to the script manager control. This property is called AsyncPostBackTimeOut and it can help us to define the number of seconds before the request will throw a request timeout exception*.
For example if you want that the timeout will take maximum 10 minutes your code should be look like this:
<asp:ScriptManager ID=”ScriptManager1″ runat=”server”
AsyncPostBackTimeOut=”600″ >
</asp:ScriptManager>
The default value of the AsyncPostBackTimeOut property is 90 seconds.
Sure enough, adding the AsyncPostBackTimeout property and setting it to 3600 seconds solved my problem nicely.
Thanks!
Thanks Kent, it was very helpful for me.