Quantcast
Channel: CodeSection,代码区,SQL Server(mssql)数据库 技术分享 - CodeSec
Viewing all articles
Browse latest Browse all 3160

Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting ...

$
0
0

By:Dallas Snider || Related Tips: > Reporting Services Development

Problem

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?


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...
Solution

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.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

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.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

Make a backup copy of the web.config file.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

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.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

Search the web.config file for httpRunTime.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

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.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

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.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

Connect to the server.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

Stop the service.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

Start the service. After the service has started the changes should be in place.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

To restart Reporting Services through the Services application, scroll down to SQL Server Reporting Services, right click and then select restart.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

Deploy the report(s) again from Visual Studio.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...

This time the deployment was successful.


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...
Next Steps

Please make sure that your report renders correctly in the SQL Server Reporting Services Web Portal. Also, please check out the following tips onwww.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 Update: 2/7/2017


Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...
Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...
About the author
Resolving the Maximum Request Length Exceeded Exception in SQL Server Reporting  ...
Dr. Dallas Snider is an Assistant Professor in the Computer Science Department at the University of West Florida and has 18+ years of SQL experience. View all my tips

Related Resources

More Business Intelligence Tips...

Viewing all articles
Browse latest Browse all 3160

Latest Images

Trending Articles