ssrs error Maximum request length exceeded - reporting-services

I open a report file (created in SSRS 2014) in report builder of SSRS 2016 in order to save it into report manager site OR preview it, I get this error:
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.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)
Upload option on report manager site doesn't work either.

This error is due to the size of the .rdl file. My .rdl file was about 4MB, so I only needed to increase the value of maxRequestLength at httpRuntime line on web.config file and then, restart iis:
httpRuntime executionTimeout = "9000" maxRequestLength="500000"
In this case, I set the max size to 5 MB.

I got the same issue recently when I had to change a picture header.
I found that every time you are adding image resources it keeps it in the report under Images.
Check if you have anything you can remove here:

You need to modify two Web.config files property under the httpruntime element. You will find under path for
1)Report Manager \Program Files\Microsoft SQL Server\MSSQL.12\Reporting Services\ReportManager
2)Report Server \Program Files\Microsoft SQL Server\MSSQL.12\Reporting Services\ReportServer
httpRuntime executionTimeout = "9000" maxRequestLength="500000"
Edit above line with bold text (as explained by ##sqluser)

Error:“SQL Reporting Services Error- Maximum request length exceeded”
It’s an easy fix though. You’ve got to adjust the web.config for the web app, which in the case of reporting server, is usually somewhere like this:
C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer
Find the web.config file for your reporting services instance, open it up, and track down the line that looks something like this
executionTimeout = “9000” />
Now just add a max request length attribute in there to fix the problem, adjust your size as needed. This is 5meg.
executionTimeout = “9000” maxRequestLength=”500000″ />
And now you’ll need to restart IIS. start->run->”iisreset”
https://www.isolutionspartners.com/2011/09/16/sql-reporting-services-error-maximum-request-length-exceeded/

Related

SSRS Web Config - maxRequestLength

Can someone happen to let me know what the maximum value that can be set for maxRequestLength in the SSRS web.config file. I currently have it set to 2097151 but if I increase it any further the SSRS Reports homepage stops working and just displays "Error" I have restarted SSRS through the service as well as the config manager but nothing seems to work, can anyone assist? The location of the file that I am editing is "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer"
Thanks
I have found what was the issue, though I had set the maxRequestLength within the relevant config files in SSRS, I had to also amend the Limit Size set in IIS for the SMTP, once I had increased the size here everything worked fine.
I think there was some initial confusion on the error message due to getting a similar one before based on the config file.

SSRS Report Viewer - ASP.Net Session Expired or not found on NLB (SQL Server)

Hi,
I have an issue on NLB production environment where two application servers are configured. Both have a virtual directory of ReportViewer that renders SSRS reports in an iframe using an .aspx page.
After the "ASP.NET session has expired or could not be found" error, i changed the sessionState mode=SQLServer with custom database, still the error is there. I can see session entries in the DB table as well.
What else could be missing?
-I have read somewhere that having an _ (underscore) in domain name can cause this. I have checked the URLs, there is an underscore in querystring parameter but not the domain name itself, and the querystring is auto-generated by ReporViewer ScriptResource.axd itself.
-KeepSessionAlive is also true & AsyncRendering is also true, checked these in both states, issue did not get resolved.
-cookieless is set to "false"
-ReportViewer version is following :
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=xx" />
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=xx" />
Any help to point me in the right direction would be appreciated. Thanks :)
The main thing you need to think about in an NLB scenario with SSRS is ViewState. If a user is hitting a load balanced URL, their traffic could go to any of the SSRS servers in the load balancer pool. You need to set up the same machinekey on all SSRS servers to allow their session to be picked up by any of the servers.
I wrote about all the required steps in the below SQLShack post. As long as SSRS is setup like this, the front end doesn't know/care beyond the fact you are giving it a (load balanced) URL to hit. Hope that helps!
https://www.sqlshack.com/scaling-out-reporting-services-changes-in-sql-server-2016/

Long list of parameters in SSRS

I have a report with a list of customers passed in as a parameter. This list has become quite large and found it hit the limit imposed by MaxHttpCollectionKeys. I've found this documented in several posts, but I now have a more specific issue.
I have set this a lot higher in the SSRS web.config file which has solved the problem when I access the report via the report manager (ServerName/Reports). However this doesn't solve the problem when I render via the report server (ServerName/ReportServer).
I do need to access these reports via the report server as we pass some hidden parameters through from our App, as well as having some user selectable parameters. Searching for the solution only gives me posts related to the original solution which I've found.
Does anyone else have any ideas on solutions for this.
Many thanks.
Ok found solution.
I didn't realise there are two web.config files. One for the manager, one for the server. These both needed to have the mod made. Needed to add the following code to the web.config file in
C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer
Between the < system.web > and < runtime > tags.
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="20000" />
</appSettings>

exporting an SSRS report to Excel failure

When trying to export an SSRS report to excel, I am getting a runtime error. I have looked at the logs and see the following:
ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.;
The report displays fine in Report Manager, and has run successfully in the past.
The report is only not very complex, and is approx 40 columns wide. When I run the query in SSMS I get 27,628 records, and it takes 3 seconds to run (again, im SSMS). The report runs fairly quickly in Report Manager also, and exporting the results to .scv format works as expected.
If any additional information is needed to help with resolving this, please let me know and I will provide it. Thanks for you help in advance!
Additionally, report has been set to not timeout. Report runs in VS2010 and exports to Excel as expected.
Your connection might be timing out. Try changing the timeout length by:
1.Open the rsreportserver.config with Text Editior(e.g. Visual Studio, NotePad). By default, it is hosted in C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer
2.Change the value for 'DatabaseQueryTimeout'. Valid values range from 0 to 2147483647. A value of 0 specifies an unlimited wait time and therefore is not recommended.
3.Save the file, and then restart the Reporting Services to apply the changing.
http://msdn.microsoft.com/en-us/library/ms157273.aspx
This tip is for anyone struggling with SSRS Excel export runtime error:
I got this error when I had a typo in my .rdl-file, namely in Language-element I had culture written wrong. Replacing it with value: =User.Language, fixed my case.
Try adding the config below on your web.config (main app). This change resolved my issue.
<location path="Reserved.ReportViewerWebControl.axd">
<system.web>
<!-- adjust the timeout value accordingly -->
<httpRuntime executionTimeout="3600"/>
</system.web>
</location>

SSRS 2012 not rendering charts in a PDF (A generic error occurred in GDI+)

I have a data driven subscription that renders the report in PDF. SSRS 2012, Win 2008 R2 (on Hyper-V) is used.
I have looked in ExecutionLog3, the shared data sets all successfully refresh, the reports successfully render and are output to the correct folder.
I did read somewhere that when rendering the reports in IE that the user needed permissions to the Temporary Internet Files folder, however I don't know if this is valid for data driven subscriptions? I did add the execution account (a local user) to have read/write permissions on the ReportServer temp internet folder.
Apart from this I have no idea what to look for to troubleshoot this issue? Any suggestions will be welcomed.
EDIT - 2012-11-19
Have found the following unhandled exception error in the ReportServer log:
ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.RenderingObjectModelException: , Microsoft.ReportingServices.ReportProcessing.RenderingObjectModelException: A generic error occurred in GDI+. ---> System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at Microsoft.Reporting.Chart.WebForms.Chart.Save(Stream imageStream, ChartImageFormat format)
at Microsoft.ReportingServices.OnDemandReportRendering.ChartMapper.GetImage(ImageType imageType)
--- End of inner exception stack trace ---;
It turns out that the GDI+ drivers needed updating on Windows 2008 R2 Server and is a known issue. If you want to know what version of GDI+ you have then do a file search for gdiplus.dll.
I posted the same question here and got a response saying to update the drivers via a hotfix, which can be found at this link, and it provides the version of the gdiplus.dll that will be installed with the hotfix, so you can compare if there is a version change necessary.
You need to request the hotfix, and an email will be sent to you giving you the download location.
This also solved the issue of images not rendering as well as charts