SSRS Upload 14Mb report not working (Maximum request length exceeded.) - reporting-services

I know this is a stupid question, but the answers I find didn't work for me or I do something wrong?
I need to upload a 14.2Mb report to SSRS and got Maximum request length exceeded.
I have change web.config to : httpRuntime executionTimeout="9000" maxRequestLength = "16384"
in
C:\Program Files\Microsoft SQL Server\MSRS12.EXO\Reporting Services\ReportManager\Web.config
and
C:\Program Files\Microsoft SQL Server\MSRS12.EXO\Reporting Services\ReportServer\Web.config
Then I did a IIS reset. After this I got 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.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)
What have I done wrong?

The problem was that I have to change the maxRequestLength = "1048576". I'm not sure why the value of 16384 did not work for a 14Mb report? But the problem is solved for me :)

Related

ASP.NET MVC controller return JSON on error. Not consistent on dev machine vs. dev server

I have a MVC controller returning Task in a FileUpload function.
(I use a Controller in stead of ApiController to make the file upload work properly)
My problem is whenever an exception is thown (for instance a file not being on a white list of allowed file types), my code behaves differently when debugging compared to code on a dev server I have.
My code:
//Exception is thown, message is put into the errorMessage parameter
Response.StatusCode = 500;
Response.StatusDescription = errorMessage;
Response.ContentType = "application/json";
return Json(new { Type = "Error", Message = errorMessage });
On the dev server, I get HTML result
I can't find any significant differences in web.configs
Does anyone know where to investigate ?
This might be a simple configuration thing, but I can't figure this out.
The IIS custom errors are intercepting the response and replacing it with an error page. Either setting Response.TrySkipIisCustomErrors = true; or changing the httpErrors[existingResponse] setting to PassThrough should allow the original response to be returned.
<system.webServer>
<httpErrors existingResponse="PassThrough" />
</system.webServer>

Error while loading ssrs report

I got the following error while loading data using ssrs report:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error
occurred while processing the request on the server. The status code
returned from the server was: 12031
My Data is not large.
This error may be due to the HTTP Runtime limitation of the maxRequestLength. The default value is 4096.
Try adding (or editing) the following entry in your Web.Config:
"<httpRuntime maxRequestLength="8192" />"
(effectively allowing 8mb of data transmission, instead of the default 4mb).
You'll want to enter this in the System.Web configuration section.

SSRS only showing blank reports

I've been trying to get SSRS working but I only get blank reports (using the sample reports from codeplex).
Logs have this error
ui!ReportManager_0-1!1430!04/26/2011-20:10:27:: Unhandled exception: System.Web.HttpException: Path '/Reports_ANTHONYWS/ScriptResource.axd' was not found.
at System.Web.HttpNotFoundHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Do your settings in Reporting Services Configuration Manager all look OK? I ask because it looks like you've changed the default "Reports" virtual directory to "Reports_ANTHONYWS", wonder if this is affecting anything.

Maximum request length exceeded exception

I'm trying to upload a 20 meg file using the upload control and it's working fine on visual studio's built in webserver but once I publish it to the production server (which I have no access to) I keep getting the following error :
Server Error in '/' Application.
--------------------------------------------------------------------------------
Maximum request length exceeded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Maximum request length exceeded.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Maximum request length exceeded.]
System.Web.HttpRequest.GetEntireRawContent() +11140903
System.Web.HttpRequest.GetMultipartContent() +72
System.Web.HttpRequest.FillInFormCollection() +245
System.Web.HttpRequest.get_Form() +119
System.Web.HttpRequest.get_HasForm() +11072199
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +124
System.Web.UI.Page.DeterminePostBackMode() +83
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +270
--------------------------------------------------------------------------------
I've added the following to my system.web node so i don't know what the real issue is.
<httpRuntime executionTimeout="800" maxRequestLength="51200" />
Any direction on this would be very helpful.
If config file change doesn't work, please try to update property httpRuntime executionTimeout="9200" maxRequestLength="200000"> directly from IIS.
For reference:
Although you have a 20Mb file, it is possible that encoding or other content on the page causes the 50Mb limit you have set to be exceeded. I recommend doubling your current setting.
There is also another web.config setting that could come into play: security request filtering maxAllowedContentLength.
This default to 30MB, but could be set differently in your environment.
The web.config entry would be something along the lines of:
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1550000000" maxQueryString="16384" />
<fileExtensions>
<add fileExtension="." allowed="true" />
</fileExtensions>
</requestFiltering>
</security>

SQL Agent and Web.Config. WAS: SSRS Forms Authentication, Running subscriptions

I have successfully implemented Forms Authentication in SSRS, so it now uses both Roles and Users from my website, using the ordinary asp.net membership framework.
I can log in to the portal and run any report, as long as I have the correct role from my original app. All good.
However, if I create a subscription, then, when the subscription runs, I don't get my report, but rather this message in the log:
subscription!WindowsService_0!161a0!10/21/2009-22:42:05:: i INFO:
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more details. --->
System.Configuration.Provider.ProviderException:
The Role Manager feature has not been enabled.
at System.Web.Security.Roles.EnsureEnabled()
at System.Web.Security.Roles.GetRolesForUser(String username)
at MyApp.ReportServer.Security.Module.Authorization.CheckAccess(String userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)
at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType catItemType, Byte[] secDesc, ReportOperation rptOper, String reportPath)
at Microsoft.ReportingServices.Library.SecurityRequirements.CheckAccess(ItemType itemType, Byte[] securityDescriptor, String itemPath)
at Microsoft.ReportingServices.Library.DefinitionLoader.GetParameterDefinition(CatalogItemContext itemContext, String historyId, Boolean forRendering, SecurityRequirements requirements)
at Microsoft.ReportingServices.Library.RSService.GetReportParameters(ClientRequest session, CatalogItemContext reportContext, Boolean forRendering)
at Microsoft.ReportingServices.Library.RSServiceDataProvider.GetParameters(ClientRequest session, CatalogItemContext reportContext)
at Microsoft.ReportingServices.Library.RenderForNewSession.GetReportParameters()
at Microsoft.ReportingServices.Library.RenderForNewSession.GetReportMetadata()
at Microsoft.ReportingServices.Library.RenderForNewSession.get_ExecuteExistingSnapshot()
at Microsoft.ReportingServices.Library.RenderForNewSession.GetExecutionStrategy()
at Microsoft.ReportingServices.Library.ReportExecutionBase.InternalExecuteReport()
at Microsoft.ReportingServices.Library.ReportExecutionBase.Execute()
at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
--- End of inner exception stack trace ---
The MyApp line is my custom security extension.
I have the RoleManager and membership provider setup in web.config in the /ReportServer directory.
Does the subscription runner circumvent the website settings somehow?
UPDATE:
Ok, so I found out, that apparently it is running with whatever is values is set in MACHINE.CONFIG when a subscription is being evaluated/triggered by sql agent.
Any clues why it doesn't use the web.config settings, but goes straight to machine.config?
I not formiliar with SSRS, but I am with .NET / membership providers and web/app/machine.config.
Your exception states subscription!WindowsService_0!161a0!10/21/2009-22:42:05::
I think this means the subscription service is a windows service and doesn't run in IIS. This means it has a different configuration file.
http://reportserver -> IIS -> web.config (Your configuration)
subscription!WindowsService -> Services -> app.config -> machine.config.
Hope it helps.