Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting Services
By: Dallas Snider | Updated: 2017-02-07 | Comments (5) | Related: > Reporting Services Development
When deploying a report in SQL Server Reporting Services, I am receiving an exception error stating "Maximum request length exceeded" as shown below. How do I resolve this?
By default, the maximum file size that can be deployed to SQL Server Reporting Services is 4 megabytes. In this tip we will walk through the steps on how to resolve this exception error. The examples shown here are on Windows 10 using SQL Server 2016.
The first step is to go to the directory holding the Report Definition Language (*.rdl) files to examine the size of the files we are attempting to deploy. Notice the highlighted file exceeds 4 MB so we know we are on the right track. This particular report file has an ESRI map embedded in it.
The second step requires us to edit the web.config file for the ReportServer. Go to the ReportServer sub-directory where SQL Server Reporting Services is installed. In this example, the path to the ReportServer directory is C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer.
Make a backup copy of the web.config file.
Open the web.config file with a text editor such as Notepad. If Visual Studio is installed, double-clicking on web.config should open the file in Visual Studio.
Search the web.config file for httpRunTime.
Add maxRequestLength with a file size in bytes. In this example we are setting the maxRequestLength to 8388608 which is 8 MB. Save the web.config file.
The changes to the web.config file do not become effective until Reporting Services is restarted. We can restart the service through the Reporting Services Configuration Manager, the Services application, or by rebooting.
To restart the service through the Reporting Services Configuration Manager, start the Reporting Services Configuration Manager.
Connect to the server.
Stop the service.
Start the service. After the service has started the changes should be in place.
To restart Reporting Services through the Services application, scroll down to SQL Server Reporting Services, right click and then select restart.
Deploy the report(s) again from Visual Studio.
This time the deployment was successful.
Please make sure that your report renders correctly in the SQL Server Reporting Services Web Portal. Also, please check out the following tips on www.mssqltips.com.
- Create a Greenbar Report in SQL Server Reporting Services
- Remove Question Mark and Show Correct Total Number of Pages in SSRS Report
- SQL Server Reporting Services Expression Builder to Reformat or Convert Text Box Values
- Determining who is viewing reports in SQL Server 2012 Reporting Services
- Plotting a Bell Curve in SQL Server Reporting Services
Last Updated: 2017-02-07
About the author
View all my tips