使用 Reporting Services 执行 Web 服务接收大型报告时出错

Error receiving large report using Reporting Services Execution Web service

我有一个将照片数据存储在数据库中的应用程序。 SSRS 报告用于生成与特定实体相关的照片报告。生成此报告所需的信息存储在单独的数据库中,并且非常简单地将 ReportId 与多张照片相关联。 Reporting Services 执行 Web 服务用于以 Word 格式呈现报表并输出字节数组,然后由应用程序使用。

问题是,有一个非常明确且可重复的大小限制,超过该限制应用程序将不会收到报告。在每种情况下,报告都已成功呈现,但从未根据 RS 日志发送响应:

rshost!rshost!1bfc!03/14/2018-21:46:48:: e ERROR: HttpPipelineCallback::SendResponse(): failed writing response.
rshost!rshost!1bfc!03/14/2018-21:46:48:: e ERROR: Failed with win32 error 0x0057, pipeline=0x0000027542592740.
httpruntime!ReportServer_0-1!1bfc!03/14/2018-21:46:48:: e ERROR: Failed in 
BaseWorkerRequest::SendHttpResponse(bool), exception=System.ArgumentException: Value does not fall within the expected range.
   at Microsoft.ReportingServices.HostingInterfaces.IRsHttpPipeline.SendResponse(Void* response, Boolean finalWrite, Boolean closeConn)
   at ReportingServicesHttpRuntime.BaseWorkerRequest.SendHttpResponse(Boolean finalFlush)
library!ReportServer_0-1!1bfc!03/14/2018-21:46:48:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: RsWorkerRequest::FlushResponse., Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: An internal or system error occurred in the HTTP Runtime object for application domain ReportServer_SSRS_0-1-131655000672564770. ---> System.ArgumentException: Value does not fall within the expected range.
   at ReportingServicesHttpRuntime.BaseWorkerRequest.SendHttpResponse(Boolean finalFlush)
   at ReportingServicesHttpRuntime.RsWorkerRequest.FlushResponse(Boolean finalFlush)
   --- End of inner exception stack trace ---;
rshost!rshost!1bfc!03/14/2018-21:46:48:: e ERROR: HttpPipelineCallback::SendResponse(): failed writing response.
rshost!rshost!1bfc!03/14/2018-21:46:48:: e ERROR: Failed with win32 error 0x10DD, pipeline=0x0000027542592740.

这似乎与服务 http 响应的某些大小限制直接相关,原因如下:

有没有人在使用 RS 网络服务时遇到过类似的行为?我在网上广泛搜索但没有任何运气。非常感谢任何有关如何解决此问题的建议。

Microsoft 最终将 HttpSendResponseEntityBody 确定为错误来源。该函数发送与 HTTP 响应关联的实体主体数据,并且根据 MSDN 具有以下参数:

EntityChunkCount [in] A number of structures in the array pointed to by pEntityChunks. This count cannot exceed 9999.

Microsoft 没有任何解决报表大小限制的 SSRS 文档。在这个阶段,他们所做的只是建议 "we can use other tools for this data extracting" 和 "generally we suggest put the data smaller than 100MB or the row counts less than 1,000,000".