balbarak / WeasyPrint-netcore

WeasyPrint Wrapper for .Net on Windows
BSD 3-Clause "New" or "Revised" License
70 stars 19 forks source link

Permissions issue in IIS #17

Open bobvaselaar opened 3 years ago

bobvaselaar commented 3 years ago

I get this error when attempting to create a PDF from inside of IIS 10, Windows Server 2019

            using (WeasyPrintClient client = new WeasyPrintClient())
            { 
                // doc is html string
                var outputPdf = await client.GeneratePdfAsync(doc);  
            }

"Access to the path 'C:\Windows\system32\config\systemprofile\AppData\Roaming\balbarak-weasyprintv51' is denied."

This is fixable by granting access to the path from the app pool user account, but it seems like it shouldn't be trying to access that in the first place.

Great PDF generator by the way. Works great other than the issue above.

anteeek commented 1 year ago

Another issue (or non-issue) somewhat related to IIS is that it doesn't seem to work on 32bit app pools - it silently fails and returns null. However, simply switching to 64bit solves the issue. And, yeah, I agree that this is the best generator for web apps I found - all the wkhtmltopdf don't work with more legacy .net versions and/or have big concurrency issues