jsreport / jsreport-dotnet

jsreport .NET sdk home repository
https://jsreport.net
MIT License
63 stars 10 forks source link

Request body larger than maxBodyLength limit #55

Closed smartprogrammer93 closed 3 years ago

smartprogrammer93 commented 3 years ago

I am getting this:

jsreport.Local.JsReportBinaryException: 'Error rendering report: rendering has finished with errors:
A critical error occurred while trying to execute the render command (2).
 Error while executing request to remote server.
 Request body larger than maxBodyLength limit (1).
 caused by error (2):-> 
stackError:    at onCriticalError (D:\snapshot\jsreport\node_modules\jsreport-cli\lib\commands\render.js:302:19)
at D:\snapshot\jsreport\node_modules\jsreport-cli\lib\commands\render.js:201:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)caused by error (1):'

Although i did set the limit to 100mb like this:

services.AddJsReport(new LocalReporting()
               .UseBinary(JsReportBinary.GetBinary())
               .Configure(cfg =>
               {
                   var expressConfig =  new ExpressConfiguration();
                   expressConfig.InputRequestLimit = "100mb";
                   cfg.Extensions.Express = expressConfig;
                   return cfg.AllowedLocalFilesAccess()
                           .BaseUrl(env.WebRootPath);
               })
               .KillRunningJsReportProcesses()
               .AsUtility()
               .Create());
pofider commented 3 years ago

This should be fixed in the later jsreport.Binary nuget. What version do you use now?

smartprogrammer93 commented 3 years ago

You are right,

I was using version 2.9 solved after updating to 2.11

Thanks a lot