1
Vote

Access to the path wkhtmltopdf.exe is denied

description

HI, and thanks for this useful library !

I have a problem web I deploy my asp.net application on IIS and I use your library.

The code htmlToPdf.GeneratePdf(html) failed with error "Access to the path ....\bin\wkhtmltopdf.exe is denied".

On iis express/localhost, no problem everything is fine

my server is a windows server 2012, My application is an application ASP .NET WebForm site in framework 4.5.2.

The authorization seems OK, the users IUSR and IIS_IUSRS have read and execute right on the exe.

Have you any idea ?

Thanks !

Julien Gourdon
.NET Developer

comments

fedorchenko wrote Feb 6, 2016 at 7:04 AM

Hi Julien,
The code htmlToPdf.GeneratePdf(html) failed with error "Access to the path ....\bin\wkhtmltopdf.exe is denied"
PdfGenerator tries to extract wkhtmltopdf to the app bin folder by default and in some cases asp.net process has no write access to this folder. You may change this default location by setting PdfToolPath property.