Tuesday, November 13, 2012

Reporting Services error: Maximum request length exceeded

Last week a colleague asked me to have a look at a Reporting Services problem. The reporting server returned the following error message when she tried to upload a report:

Error : There was an Exception running the extension specified in the config file –> maximum request length exceeded.

The problem started to occur after she added a large image to the report. By doing this the report size became too big and the report server started to complain that we are sending more data than it is configured to accept.

Fixing this is similar to every other web application, do this by changing the web.config. This config file can be found on the following path: C:\Program Files\Microsoft SQL Server\MSRS10_50.SQLEXPRESS\Reporting Services\ReportServer

  • Open the config file and find the following line:
    <httpRuntime executionTimeout = "9000" />
  • Add a maxRequestLength attribute in there to fix the problem:
    <httpRuntime executionTimeout = "9000" maxRequestLength="1000000" />
  • Restart IIS.

1 comment:

Geert Verhoeven said...

Bart,

If the query behind the report takes more then 2 minutes, you report will still fail. This is because the setting you've changed is for the http execution timeout but reporting services also has its own timeout settings (for db access). This can be configured in the rsreportserver.config file (see http://msdn.microsoft.com/en-us/library/ms157273(v=sql.110).aspx).

Note that you can also override this setting in the report itself to avoid changing the server's default setting. (see http://msdn.microsoft.com/en-us/library/ms179924.aspx)

Greets,

Geert