RickStrahl / WestWind.WebView.HtmlToPdf

Creating Pdf output from Html with .NET on Windows using the WebView2 control
MIT License
33 stars 4 forks source link

Hangs when trying to run on windows server #8

Open bvandorf opened 1 month ago

bvandorf commented 1 month ago

Hi while running this in a process that does not have desktop access on windows server 2019, it works fine if I rdp to the server and run the console application but not if it is run when logged off.

RickStrahl commented 3 weeks ago

It works but you need to have permissions that allows access to profile settings. See releated blog post for details.

bvandorf commented 2 weeks ago

ok I have read the blog post again and used your Console Sample project and the only think I changed was I removed the ShellUtils.OpenUrl(outputFile); to prevent the browser from opening at the end.

it works fine with a desktop environment, but when the Console Sample exe it is executed from a service it hangs. it is possible that it does not work on a hardened server where the service user is a domain user.

I also tried the AspNet IIS site example project it returned a 500 error, and that was with just the IIS user it does not even write to the ./logs or the C:\Temp\WebViewEnvironment folder.