Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

How to fix "Failed in BaseWorkerRequest::SendHttpResponse Value does not fall within the expected range" in Reporting Services 2016?

Posted on by 5

Hi,

I have a problem with generating huge report to PDF File. In log I can find:

rshost!rshost!444!04/20/2023-16:48:20:: e ERROR: HttpPipelineCallback::SendResponse(): failed writing response.
rshost!rshost!444!04/20/2023-16:48:20:: e ERROR: Failed with win32 error 0x0057, pipeline=0x000001711039FB10.
httpruntime!ReportServer_0-1!444!04/20/2023-16:48:20:: 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!444!04/20/2023-16:48:20:: 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_MSSQLSERVER_0-1-133264663787788551.  ---> 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!444!04/20/2023-16:48:20:: e ERROR: HttpPipelineCallback::SendResponse(): failed writing response.
rshost!rshost!444!04/20/2023-16:48:20:: e ERROR: Failed with win32 error 0x10DD, pipeline=0x000001711039FB10.

Report logic / Data comes from our Preprocess class. Report has 1310758 records and 480135405 bytes (info from ExecutionLog). Generating data goes smoothly. Above error occurs in my opinion at the end of rendering to file.

Additionally, when I ran the same report as RDL (print to screen), generating ends successfully. But when I want to export generated to screen report to PDF file after few minutes I see OutOfMemory Exception.

I have two environment of our ERP System. On the old one, report runs without any troubles. Above error occurs only on new environment. So there is might be difference of version or difference in some configuration.

New environment: OS Version: 2016, SQL: 13.0.6404.1, RS: 13.0.6300.2

Old environment: OS Version 2012 R2, SQL: 13.0.4466.4, RS: 13.0.4466.4

I've already extended maxRequestLength and executionTimeout in httpRuntime in web.config to max of int32, but it not fix my issue.

What else I can check or change?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans