ReportViewer timeouts in spite of timeout settings

ⅰ亾dé卋堺 提交于 2019-12-03 04:56:39

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

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.

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" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!