I am wrapping headless chrome using the excellent ChromeHtmlToPDF library. This we are using to dynamically render PDFs from a website. This works locally under IIS express, and also works on the server when recompiled as a console app, so the technology works. However running under IIS, chrome always exits immediately and a error of "one or more parameters are invalid", is returned.

1 Answers

0
Kinetic On Best Solutions

After many many hours looking into this I finally solved it by running it under my own user, the restricted IIS user, then comparing the activity logs generated by the excellent microsoft process monitor.

I tracked it down to file permissions on one directory: C:\Windows\System32\config\systemprofile\AppData\Local\Google\Chrome\User Data

The app pool user needs write + modify permissions to this directory. It's up to you if you feel this is an acceptable security risk; however for us it is, for now.

This is where headless chrome stores it's crashpad directory. No amount of parameter fiddling seems to be able to dissuade it of this. That seems to be a bug.

Hope this helps someone else, I couldn't find anything on this anywhere.