Think about a scenario where you have a report that takes more than 90 seconds to complete its operation and give the rendered report back to you. The report renders perfectly as expected when you view it from Report manager (For our convenience lets take that the report takes 120 seconds to come up). Now you want this report to be shown to your clients / users in your custom ASP.NET application.
The obvious choice would be to use ReportViewer 2010 web server control. The ReportViewer Web server control is an ASP.NET AJAX control used to host reports in ASP.NET AJAX projects. You can refer here to read more about this control and how to use them in your projects.
In your project you’ve dragged and dropped the ReportViewer 2010 web server control along with the AJAX ScriptManager which is required to host the report viewer web server control. Then you point the control to load the above discussed report, as soon as the page gets loaded.
When you look in to the message, it shows similar to the following,
Message: Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.
If you go to Reporting service executionlog table, again to your surprise it says the report has successfully rendered.
Now what’s next is going to be important.
The above error in the browser is caused because of the ScriptManager’s AsyncPostbackTimeout. By default it is 90 seconds.
So, all you need to do is, locate the ScriptManager element in your ASPX UI file and change the timeout value to “Do not timeout” as shown below,
<asp:ScriptManager ID=”ScriptManager1″ runat=”server” AsyncPostBackTimeout=”0″></asp:ScriptManager>
Now view the page and the reportviewer web server control should be greatful enough to show you the rendered report.
[All the posts are AS-IS with no warranty]