jsreport/jsreport-dotnet

jsreport causes HTTP Error 500.30 - ANCM In-Process Start Failure

Mr-Technician opened this issue · 2 comments

I'm running a .NET Core 3.1 application with jsreport.AspNetCore, jsreport.Binary, and jsreport.Local installed. I have added jsreport in my ConfigureServices on startup.cs like this:

services.AddJsReport(new LocalReporting().UseBinary(JsReportBinary.GetBinary()).AsUtility().Create());

This works fine with IIS Express on localhost but causes an HTTP 500.30 error on both a production IIS 10 and a test IIS 8.5 server. Removing this line and publishing again allows the application to load normally. Looking at the event viewer I see these errors:

Application '/LM/W3SVC/1/ROOT/CareersEEO' with physical root 'C:\inetpub\wwwroot\CareersEEO\' failed to load coreclr. Exception message:
CLR worker thread exited prematurely
Application '/LM/W3SVC/1/ROOT/CareersEEO' with physical root 'C:\inetpub\wwwroot\CareersEEO\' hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs:
Unhandled exception. System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\CareersEEO\jsreport' is denied.
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
Application: w3wp.exe
CoreCLR Version: 4.700.20.11803
.NET Core Version: 3.1.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\CareersEEO\jsreport' is denied.
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)

This seems like some sort of permission error, except no jsreport folder exists on localhost. Add a jsreport folder at the path it is looking for and ensuring the proper permissions are in place doesn't fix it. What's going on here?

Oh wow, I think that fixes the issue. I'll look more closely tomorrow when I'm working though. Thanks @pofider

Edit: Yes, that does fix the issue!