I have a c# console application that is using WebBrowser control and print documents to a printer. I have scheduled that job to run everyday using Task Scheduler.
When I run the console app exe with option "Run Only when user is logged on" everything works fine. However when I change it to "Run whether user is logged on or not", my process fails and I see following in the Event Viewer.
Faulting module name: MSHTML.dll, version: 11.0.9600.18792, time stamp: 0x59908408
Exception code: 0xc0000005
Fault offset: 0x00bd397f
Faulting process id: 0x2768
Why is webBrowser not working with "Run whether user is logged on or not" Any ideas ? Thanks all.
Ref: Print WebBrowser without previewing i.e. single click print