Share via


SQL Server Reporting Services Error: Maximum request length exceeded

Introduction 

In this article, we will overcome the "Maximum request length exceeded" issue that occurs when upload large size report in SQL Server Reporting Service.

https://gallery.technet.microsoft.com/site/view/file/182915/1/Reporting%20Services%20Error%20Maximum%20request%20length%20exceeded%2097.png


Scenario

In SQL Server Reporting Service 2012, we tried to upload a new report that its size ~6 MB via Report Manager, unfortunately, we got the below error 

SQL Server Reporting Services Error: Maximum request length exceeded.

https://gallery.technet.microsoft.com/site/view/file/182916/1/Reporting%20Services%20Error%20Maximum%20request%20length%20exceeded.gif


Cause

By default, the Maximum Request Length is 4 MB, so that this issue occurs in case the uploaded report size is larger than 4 MB.


Solution

In SQL Server Reporting Service, to adjust the Maximum Request Length default value, you should edit the "httpruntime" tag setting in 

  • Report Server Web Config.
  • Report Manager Web Config

https://gallery.technet.microsoft.com/site/view/file/182917/1/Reporting%20Services%20Web%20Config.png

Set the Maximum Request Length in Report Server Web Config

  • Go to "C:\Program Files\Microsoft SQL Server\MSRS11.SQLInstance\Reporting Services".
    • **Note: **The MSRS11.SQLInstance depends on your SQL Instance Name.
  • Open the "Report Server" Folder > Edit the Web.config with an appropriate editor.
  • Search for "httpRuntime" tag > add Add "maxRequestLength" propery > set it to appropriate limit (KB) based on the maximum report size you have.
    • In our case, the report size is larger than 6MB, so we should set it as  **maxRequestLength="70000" **
  • Save and Close.

https://gallery.technet.microsoft.com/site/view/file/182918/1/Edit%20Report%20Server%20web%20Config%20-%20maxRequestLengt.gif

Set the Maximum Request Length in Report Manager Web Config

  • Again, Go to "C:\Program Files\Microsoft SQL Server\MSRS11.SQLInstance\Reporting Services".
    • **Note: **The MSRS11.SQLInstance depends on your SQL Instance Name.
  • Open the "Report Manager" Folder > Edit the Web.config with an appropriate editor.
  • Search for "httpRuntime" tag > add Add "maxRequestLength" propery > set it to appropriate limit (KB) based on the maximum report size you have.
    • In our case, the report size is larger than 6MB, so we should set it as **maxRequestLength="70000" **
  • Save and Close.

https://gallery.technet.microsoft.com/site/view/file/182919/1/Edit%20Report%20Manager%20web%20Config%20-%20maxRequestLengt.gif

Uploading large report in SQL Server Reporting Service.

 After you have set the Maximum Request Length in Report Manager and Report Server web configs, try now to upload the report via Report Manager that should be uploaded properly as explained below:

https://gallery.technet.microsoft.com/site/view/file/182920/1/SSRS%20Error%20Maximum%20request%20length%20exceeded.gif


Applies To

  • SQL Server 2014.
  • SQL Server 2012.
  • SQL Server 2008.

Conclusion

In this article, we explained How to set the Maximum Request Length in Reporting Service to be able to upload large reports.

Reference

SSRS Error - Maximum request length exceeded


Back To Top