Wednesday 10 July 2013

Error in SSRS – System.Web.HttpException: Maximum request length exceeded

After finishing developing a new report on a new solution on reporting services (this case on SSRS 2008 R2) I receive the following error while trying to deploy the project:

System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. —> System.Web.HttpException: Maximum request length exceeded. at System.Web.HttpRequest.GetEntireRawContent() at System.Web.HttpRequest.get_InputStream() at System.Web.Services.Protocols.SoapServerProtocol.Initialize() — End of inner exception stack trace — at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

This error occurs because exists a property MaxRequestLength under the httpRuntime element in the file web.config (<your SSRS folder>\Reporting Services\ReportServer) where its default value is 4096 KB (4 MB) and when the report size is higher than this value, Reporting Services can’t upload a report successfully.

This error can be solved by doing the following steps:
1. Go to
(Example-> C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer)

2. Open the File
web.config

3. On the file web.config change the line
<httpRuntime executionTimeout=”9000″/>
To (for example):
<httpRuntime executionTimeout=”9000″ maxRequestLength = “16384″ />
By default, the property maxRequestLength doesn’t exist in the config file and the default value is 4096 KB so you have to increase that value. In example above I am increasing the value to 16384 KB.

No comments:

Post a Comment

Azure AzCopy Command in Action

Azure AzCopy Command  in Action -  Install - Module - Name Az - Scope CurrentUser - Repository PSGallery - Force # This simple PowerShell ...