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.


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.



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

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.

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.

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:



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