ReportViewer - Failed to export data


  • Hi,

    I use ReportViewer control (ReportViewer version: 2010 SP1) with LocalReport option (using .rdlc files) to display reports in my project. When export data in ReportViewer control to Excel file, I got the "The remote host closed the connection. The error code is 0x800704CD" error message. The data contained in the ReportViewer control is quite large - more than 25.000 records, each record has 23 columns.

    The duration from the time I clicked on the Excel export link to the time I got the IE error page is 10 minutes. I repeated the test multiple times and the results are the same. So I suspected this might be caused by a timeout configuration of the web application. Thus, I set the httpRuntime/executionTimeout (obviously I set the debug mode of the web to false), session timeout, and form authentication cookie timeout to 1 hour, but the result is the same (got the error page after 10 minutes).

    Do you know what caused this issue? Could you please help?

    Below is the details of the error I got.

    Exception information:
        Exception type: HttpException
        Exception message: The remote host closed the connection. The error code is 0x800704CD.
       at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
       at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
       at System.Web.HttpResponse.Flush(Boolean finalFlush)
       at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
       at Microsoft.Reporting.WebForms.ReportDataOperation.StreamToResponse(Stream data, HttpResponse response)
       at Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response)
       at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    Request information:
        Request URL: http://xxx/Reserved.ReportViewerWebControl.axd?Culture=2057&CultureOverrides=True&UICulture=2057&UICultureOverrides=True&ReportStack=1&ControlID=44d295a585a8483984f0f7606a3d7fa5&Mode=true&OpType=Export&FileName=Invoice_&_Order_List_Report_20130801032657&ContentDisposition=OnlyHtmlInline&Format=Excel
        Request path: /xxx/Reserved.ReportViewerWebControl.axd
        User host address: xxx
        User: xxx
        Is authenticated: True
        Authentication Type: Forms
        Thread account name: IIS APPPOOL\xxx

    How to make the best better?

    Thursday, August 01, 2013 2:52 AM

All replies

  • Anyone could help, please!

    How to make the best better?

    Tuesday, August 06, 2013 2:20 AM
  • Hi Tri,

    In your description, you said that the report contain large data more than 25.000 records, each record has 23 columns, right? In Reporting Services, when export report to Microsoft Excel, if we don’t add page breaks to rectangle, data regions, or groups within data regions for a report, then all the report contents will be exported into one worksheet. If the report data is large, then this can cause timeout issue. So in your scenario, you can add page break for the report manually, then the report will be exported into multiple worksheets. Here has a thread which is similar to yours, please see:

    Besides, when render report, the fastest and least memory intensive formats include CSV, XML, and HTML. PDF and Excel have the slowest performance. You can try to export to CSV and check whether this issue is persists.

    Hope this helps.


    Charlie Liao
    TechNet Community Support

    Wednesday, August 07, 2013 3:28 AM
  • Hi Charlie,

    Thanks for your advice!

    Yes - my report contains large data more than 25.000 records, each record has 23 columns.

    I tried to add page breaks for every 10.000 records as you suggested, but the export still failed (timed out after 10 minutes). I guess adding the page breaks can only resolve the limitation of the number of records could be put in an excel worksheet. However, my issue is not like that (the number of my records is less than 65.536).

    Exporting data to CSV is fine, but the CSV could not carry the format as the report is displayed in the ReportViewer control. It does not meet my customer's requirement.

    As I mentioned in my question, there might be a configuration that stops the export after 10 minutes. Do you think we have a configuration like that somewhere? Or the export functionality actively stops the process after 10 minutes to save the performance?

    How to make the best better?

    Wednesday, August 07, 2013 11:13 AM
  • Hi Tri,

    This looks to be an old post. But, I am facing similar issue and so was wondering if you were able to resolve this issue?

    Thanks in advance!


    Monday, January 16, 2017 6:26 PM