Open adriantheking opened 4 years ago
Hi! Locally in your pc is running fine? what version of the library are you running?
Yes, locally everything works perfect, latest version from this repo
Hi @fpanaccia, Any updates in this area ?
@fpanaccia I have the same problem
@fpanaccia Any news about this?
I had the same problem, but making wkhtmltopdf executable helped me. I wrote in console:
chmod +x /path_to_app/Rotative/Linux/wkhtmltopdf
Maybe it will help someone. @adriantheking are you really sure Azure Pipelines gives 755 chmod for wkhtmltopdf?
@lookinsidethebox Yes I double checked it. How you running your application ?
@adriantheking I publish the application with MS Visual Studio in a local folder, manually copy files from the folder to my server (Alt Linux 8.2) and restart the application with supervisor.
Have you tried asking Azure Support? Maybe you need special permissions to run scripts on your server.
This error is expected on azure since azure doesn't let you execute .exe
files on the app service.
There is no way to fix this unless you run your own app inside your own VPS or this library changes to use .dll
directly (which lead in a total source code refactor) instead of executing the .exe
.
Good morning, I'm trying to launch library on Azure WebApp. Unfortunately all the time I have an error:
System.ComponentModel.Win32Exception (13): Permission denied at Wkhtmltopdf.NetCore.GeneratePdf.GetByteArray[T](String View, T model)
For test purpose I injected also IRazorViewToStringRenderer class from the library to check is HTML rendered properly
await this.razorViewToStringRenderer.RenderViewToStringAsync("Views/Home/Index.cshtml", results);
At this moment everything working good, method is returning rendered HTML.Problem is starting when I try to call
await generatePdf.GetByteArray("Views/Home/Index.cshtml", results);
About environment: Everything is deployed by Azure Pipelines for sure I'm giving there 755 chmod for Linux/wkhtmltopdf and Windows/wkhtmltopdf.exe files. WebApp is launched on App Service Plan S1 with Linux environment