1

I'm trying to use jsreports.net (following this answer) to generate a pdf in an aspnet core application. Locally it runs fine but when I push it to an azure web app the app fails on start up. Does anyone know if this scenario is possible?

devlife
  • 15,275
  • 27
  • 77
  • 131

1 Answers1

0

I reproduce your problem and it seems that jsreport uses headless chrome to print pdf. Unfortunately Azure Web Apps running on windows are very restrictive and doesn't allow running headless chrome process. In the other words jsreport.Local won't be able to print pdf in Azure Web Apps running on windows.

Fortunately, Azure Web Apps running in docker with Linux host are using different sandboxing strategy and headless chrome works there. If this is an option for you, enable Linux docker support in your Azure Web App and add to your Dockerfile lines from the docker chapter. Additionally you need to explicitly specify jsreport internal port, because of collision in the environment variables.

For more details, you could refer to this article.

Joey Cai
  • 18,968
  • 1
  • 20
  • 30