Ah, okay well that's unfortunate. I'll have to figure out what to do from here then.
Posts made by Eli Pulsifer
-
RE: Error rendering PDF in ASP.NET Core application in on server.
-
RE: Error rendering PDF in ASP.NET Core application in on server.
Yes, the ASP.Net Core application is running in an Azure App service on Windows 32bit. Latest version of everything, Microsoft Windows NT 10.0.14393.0, IIS 10.0 all managed by Azure.
Code is targeting netcoreapp2.2
jsreport.AspNetCore Version="2.0.0"
jsreport.Binary Version="2.3.1"
jsreport.Local Version="2.0.0" -
RE: Error rendering PDF in ASP.NET Core application in on server.
@jan_blaha Sorry for missing that data in my post. I had the "```" on the same line as the error message and for some reason it removed all that text. Please see my original post again as the error is now present with the call stack.
-
Error rendering PDF in ASP.NET Core application in on server.
Hello,
I'm getting an exception when rendering a PDF on IIS, works file locally but I get this exception when running in my App Service.
jsreport.Local.JsReportBinaryException: Error rendering report: instance has been daemonized and initialized successfully* (pid: 17484)A critical error occurred while trying to execute the render command: spawn UNKNOWN (1). caused by error (1) -> meta = {"remoteStack":"Error: spawn UNKNOWN\n at _errnoException (util.js:1022:11)\n at ChildProcess.spawn (internal/child_process.js:323:11)\n at Object.exports.spawn (child_process.js:503:9)\n at Launcher.launch (jsreportRuntime.js:313974:40)\n at <anonymous>"}, stack = Error: at responseToBuffer ([eval]:42206:29) at concat ([eval]:42259:40) at ConcatStream.<anonymous> ([eval]:13929:43) at emitNone (events.js:111:20) at ConcatStream.emit (events.js:208:7) at finishMaybe ([eval]:88932:14) at afterWrite ([eval]:88794:3) at _combinedTickCallback (internal/process/next_tick.js:144:20) at process._tickCallback (internal/process/next_tick.js:180:9) at jsreport.Local.Internal.LocalUtilityReportingService.RenderAsync(String requestString, CancellationToken ct) at GasPos.Customer.Portal.Pages.Private.Reports.ReportModelBase`1.RenderPDFContentAsync(String content) in /home/vsts/work/1/s/GasPos.Customer.Portal/Pages/Private/Reports/ReportModelBase.cs:line 123 at GasPos.Customer.Portal.Pages.Private.Reports.ReportModelBase`1.OnPostAsync() in /home/vsts/work/1/s/GasPos.Customer.Portal/Pages/Private/Reports/ReportModelBase.cs:line 116 at Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeNextPageFilterAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync() at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
This is the code to render the PDF.
public class PDFRenderService : IPDFRenderService { ILocalUtilityReportingService _renderService = new LocalReporting().UseBinary(JsReportBinary.GetBinary()).AsUtility().Create(); Task<Report> IPDFRenderService.RenderAsync(RenderRequest request, CancellationToken ct) { return _renderService.RenderAsync(request, ct); } }
It looks like JSReport is spawning a child process that has access rights issues.
Is there some way to render without creating a child process?
Is there some configuration I'm missing?