none
Report Viewer Control returns OperationCanceledException OnError event after 90 seconds RRS feed

  • Question

  • I try to render a big report via the report viewer control v10 in my ASP.NET web page. The report runs fine in Report Builder 3.0 and takes around 2 minutes and 30 seconds. When I try to run it via the web page the "Report is generated" message box is shown for about 90 seconds and then disappears with a blank report. The report viewer control OnError event handler receives the exception as shown below:

    Microsoft.Reporting.WebForms.ReportServerException: The operation was canceled. ---> System.OperationCanceledException: The operation was canceled.

       --- End of inner exception stack trace ---

       at Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension)

       at Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension)

       at Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, NameValueCollection urlAccessParameters, String& mimeType, String& fileNameExtension)

       at Microsoft.Reporting.WebForms.ServerModeSession.RenderReport(String format, Boolean allowInternalRenderers, String deviceInfo, NameValueCollection additionalParams, Boolean cacheSecondaryStreamsForHtml, String& mimeType, String& fileExtension)

       at Microsoft.ReportingServices.Rendering.HtmlRenderer.ViewerRenderer.SPBProcessingStub.GetNextPage(RPLReport& rplReport)

       at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.GetNextPage()

       at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.InitializeReport()

       at Microsoft.ReportingServices.Rendering.HtmlRenderer.ViewerRenderer.Render(HtmlTextWriter outputWriter)

       at Microsoft.Reporting.WebForms.LocalHtmlRenderer.Render(NameValueCollection deviceInfo, PageCountMode pageCountMode, ReportControlSession reportControlSession, CreateAndRegisterStream streamCallback, String& scrollScript, String& pageStyle)

       at Microsoft.Reporting.WebForms.ReportControlSession.RenderReportHTML4(NameValueCollection deviceInfo, PageCountMode pageCountMode, String& scrollScript, String& pageStyle)

       at Microsoft.Reporting.WebForms.ReportControl.RenderReport(ReportControlSession session, String viewerInstanceIdentifier, PageCountMode pageCountMode, Int32 pageNumber, InteractivityPostBackMode interactivityMode, SearchState searchState, String replacementRoot, String hyperlinkTarget, ScrollTarget scrollTarget, String alertMessage, DeviceInfoCollection initialDeviceInfos, String browserMode, Boolean sizeToContent)

       at Microsoft.Reporting.WebForms.ReportArea.RenderReport(ReportControlSession session, String viewerInstanceIdentifier, PageCountMode pageCountMode, Int32 pageNumber, InteractivityPostBackMode interactivityMode, SearchState searchState, String replacementRoot, String hyperlinkTarget, ScrollTarget scrollTarget, String alertMessage, DeviceInfoCollection initialDeviceInfos, String browserMode, Boolean sizeToContent)

       at Microsoft.Reporting.WebForms.ReportViewer.RenderReport(Boolean updateDocMap)

       at Microsoft.Reporting.WebForms.ReportViewer.OnPreRender(EventArgs e)

     

     

    After about 1 minute the error below is written to the Reporting Services log file:

    #######################################################################################

    library!ReportServer_0-1!a94!05/31/2011-17:44:48:: w WARN: Microsoft.ReportingServices.Diagnostics.Utilities.RSException: A client has disconnected from the Report Server Web service application domain ReportServer_MSSQLSERVER_0-1-129513151267635625. No corrective action is required. An error code has been submitted to ASP.NET to release the connection. The error code is 800704CD. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeClientDisconnectionException: A client has disconnected from the Report Server Web service application domain ReportServer_MSSQLSERVER_0-1-129513151267635625. No corrective action is required. An error code has been submitted to ASP.NET to release the connection. The error code is 800704CD. ---> System.Runtime.InteropServices.COMException: An operation was attempted on a nonexistent network connection. (Exception from HRESULT: 0x800704CD)

    bufferedresponse!ReportServer_0-1!a94!05/31/2011-17:44:48:: e ERROR: Exception thrown when closing result buffered stream: Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeClientDisconnectionException: A client has disconnected from the Report Server Web service application domain ReportServer_MSSQLSERVER_0-1-129513151267635625. No corrective action is required. An error code has been submitted to ASP.NET to release the connection. The error code is 800708CA. ---> System.Runtime.InteropServices.COMException: This network connection does not exist. (Exception from HRESULT: 0x800708CA)

    webserver!ReportServer_0-1!a94!05/31/2011-17:44:48:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeClientDisconnectionException: A client has disconnected from the Report Server Web service application domain ReportServer_MSSQLSERVER_0-1-129513151267635625. No corrective action is required. An error code has been submitted to ASP.NET to release the connection. The error code is 800708CA. ---> System.Runtime.InteropServices.COMException: This network connection does not exist. (Exception from HRESULT: 0x800708CA)

     

    I get the same error both in XP and in Windows 2008 R2 using IE8 or Google Chrome.

     

    I have tried to increase the ASP.NET script timeout in IIS but it makes no difference.

     

    In web.config I have the following settings under System.Web

    <httpRuntime maxRequestLength="10000" executionTimeout="240"/>

    <sessionState timeout="30"></sessionState>

     

    and under system.servicemodel

    <basicHttpBinding>
        <binding name="BasicBinding" maxBufferSize="4194304" maxReceivedMessageSize="4194304" receiveTimeout="00:05:00" sendTimeout="00:40:00" openTimeout="00:01:00" closeTimeout="00:01:00">
         <readerQuotas maxDepth="32" maxStringContentLength="524288" maxArrayLength="2097152" maxBytesPerRead="524288" maxNameTableCharCount="2097152"/>
        </binding>
       </basicHttpBinding>

     

    Anobody has any ideas of what might be causing this cancel exception after 90 seconds?

    Wednesday, June 1, 2011 1:58 PM

Answers

  • Hi,

    Thank you for your answers.

    I agree that the report takes too long time but the cutomer wants to store the data in that way.

    I found the timeout that caused the cancel problem. It was the AsyncWaitPostBackTimeout of the asp:ScriptManager that by default is set to 90 seconds. When I increased it the report was working as it should.

    Thanks

    Per

     

     

     

     

    • Marked as answer by per70 Tuesday, June 7, 2011 2:23 PM
    Tuesday, June 7, 2011 2:23 PM

All replies

  • What are you doing in the report for it to take that long? Anything over 15-20 seconds is way too long.

    Maybe you need to look into how you're getting the data for the report as increasing the timeout should be your last resort.


    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt) MCT, MCPD, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    Thursday, June 2, 2011 4:26 AM
  • Hi per70,

    First of all, I agree with Jeff to limit the report execute time. As for timeout configuration, I did several research and please also verify follows,

    Please check the the following settings in the RSReportServer.config file. Backup before making any changes.
    <Add Key="ProcessRecycleOptions" Value="1"/> <!--Disabled-->
    <Add Key="CleanupCycleMinutes" Value="36000"/> <!--10 Hours-->
    <Add Key="SQLCommandTimeoutSeconds" Value="0"/> <!--None--> (Not honored at this point of time)
    <Add Key="MaxActiveReqForOneUser" Value="100"/>
    <Add Key="DatabaseQueryTimeout" Value="0"/> <!--None-->
    <Add Key="RunningRequestsScavengerCycle" Value="36000"/> <!--10 Hours-->
    <Add Key="RunningRequestsDbCycle" Value="36000"/> <!--10 Hours-->
    <Add Key="RunningRequestsAge" Value="30"/>

    If that does not resolve the issue then,

    a. Open IIS site.
    b. Double-click the “Session State button.
    c. Change the setting for “Time-out” to 180 or 240.
    d. Open IIS site again, right-click it.
    e. Point to "Manage Web Site", click "Advanced Settings".
    f. Verify the connection timeout limitation is set to 180 or 240.

    Thanks.
    Eileen.

    Monday, June 6, 2011 3:25 PM
  • Hi,

    Thank you for your answers.

    I agree that the report takes too long time but the cutomer wants to store the data in that way.

    I found the timeout that caused the cancel problem. It was the AsyncWaitPostBackTimeout of the asp:ScriptManager that by default is set to 90 seconds. When I increased it the report was working as it should.

    Thanks

    Per

     

     

     

     

    • Marked as answer by per70 Tuesday, June 7, 2011 2:23 PM
    Tuesday, June 7, 2011 2:23 PM