none
SQL Server ASYNC_NETWORK_IO after calling ReportViewer.LocalReport.Render() RRS feed

  • Question

  • Hello,

    We have an ASP.NET Web Forms project that targets the .NET Framework 4.0.  In that project, we're using a Microsoft.Reporting.WebForms.ReportViewer control to generate PDF, Word, or Excel files of reports.  The ReportViewer is in local processing mode and uses strongly-typed DataSet objects for its data sources.  The DataSets are populated through SqlClient SqlDataAdapters.  SQL Server is 2008 R2.

    We are also using the .NET Entity Framework 5.0 to retrieve other data within the application.

    Before calling the Render method on the ReportViewer control, the calls that are using EF complete within a few seconds.  After calling the Render method, the EF calls take 20+ seconds. 

    Looking at SQL Server's Activity Monitor, the EF connections are in Task State "SUSPENDED" and Wait Type "ASYNC_NETWORK_IO" at that time.

    If I comment out the Render method on our ReportViewer as a test (but still populate the DataSets), EF performance is normal.  It appears that for some reason, we only encounter the ASYNC_NETWORK_IO issue after calling the Render method.

    From what I can gather, this error typically occurs when the calling application (our ASP.NET site in this case) does not properly inform SQL Server that it is finished with the data.  In our case though, we are explicitly calling the Close method on all database connections on the SqlClient and EF ends.  It also seems that since we're using DataSets, access to SQL Server should be done anyway by the time we call the ReportViewer's Render method.

    Any insight as to what we may be missing would be greatly appreciated - thanks!


    • Edited by PittMN Monday, April 6, 2015 5:54 PM
    Monday, April 6, 2015 4:59 PM