ReportViewer timeouts in spite of timeout settings
Asked Answered
S

4

20

I have an ASP.NET app that exposes a Microsoft ReportViewer (actually an MVC3 app with one WebForm hosting the ReportViewer). When running large reports, a timeout occurs causing the request to stop and a blank page to show in place of a report. Yet the following timeout parameters are set programmatically:

Viewer.ServerReport.Timeout = Configuration.ReportViewerTimeout;
ScriptManager.AsyncPostBackTimeout = Configuration.ReportViewerAjaxTimeout;

The respective values are -1 and 0 which as per documentation are interpreted as no timeout. I also tried large values, it made no difference.

After about a minute or so waiting on the report to load ("Loading" message box), I get a blank report and I see this in my Firebug console window:

Aborted

Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.

[Break On This Error] this._endPostBack(this._cr...anagerTimeoutError(), sender, null);

I also tried adding this to my web.config:

<httpRuntime maxRequestLength="1024000" executionTimeout="999999" /> 

And in IIS > my site > Advanced Settings > Connection Limits I set "Connection Time-out (seconds)" to 1200. All this made no difference.

Does anyone know what I could be missing?

Soundless answered 1/9, 2011 at 15:12 Comment(0)
S
13

Turns out that the answer is: There is actually nothing missing!

As it happens, the ScriptManager's timeout value is not persisted in ViewState (unlike the ReportViewer's timeout value) and the code was only setting it once inside a if (!PostBack) block. Fixed by setting the ScriptManager's AsyncPostBackTimeout property at each request (even postbacks). An alternative is to set it to a fixed value using the Visual Studio WebForm designer.

Soundless answered 2/9, 2011 at 0:26 Comment(0)
L
20

set the AsyncPostBackTimeOut="" value in script manager

   <asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeOut="56000" >
</asp:ScriptManager>

for more detail http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.asyncpostbacktimeout.aspx

Lira answered 29/8, 2013 at 4:24 Comment(1)
nice, this prevented my report timing out.Santonin
S
13

Turns out that the answer is: There is actually nothing missing!

As it happens, the ScriptManager's timeout value is not persisted in ViewState (unlike the ReportViewer's timeout value) and the code was only setting it once inside a if (!PostBack) block. Fixed by setting the ScriptManager's AsyncPostBackTimeout property at each request (even postbacks). An alternative is to set it to a fixed value using the Visual Studio WebForm designer.

Soundless answered 2/9, 2011 at 0:26 Comment(0)
P
10

Adding two of the config settings mentioned above did the trick for me.

In the web.config for the site set the executionTimeout = "10800":

 <httpRuntime maxRequestLength="2147483647" executionTimeout = "10800"/>

In the Site.Master set AsyncPostBackTimeout="56000":

 <asp:ToolkitScriptManager ID="smMaster" runat="server" AsyncPostBackTimeout="56000" />
Piloting answered 15/1, 2014 at 13:45 Comment(1)
I needed to do the executionTimeout configuration, thanks a lot....Meetinghouse
M
0

We had the exact same problem and in addition to changing the ScriptManager AsyncPostBackTimeout from the default of 90 seconds to a bigger value like 600 (10 minutes), we also had to change the Amazon ELB load balancer settings from 1 minute to 10 minutes. That worked for us.

Milreis answered 7/1, 2021 at 23:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.