I'm a little stumped as to why this windows service is not running when using the Network Service
account (but does so on other machines using the same code), getting me these two subsequent errors in event viewer:
Application: MyApplication.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 06F3C67E
Stack:
and
Faulting application name: MyApplication.exe, Version: 1.0.0.0, time stamp: 0x87654321
Faulting module name: ReferencedComLib.dll, Version: 1.0.0.0, time stamp: 0x12345678
Exception code: 0xc0000005
Fault offset: 0x0000c67e
Faulting process ID: 0x148c
Faulting application start time: 0x01d4df2e591220f2
Faulting application path: C:\Program Files (x86)\MyApplication\MyApplication.exe
Faulting module path: C:\Windows\SYSTEM32\ReferencedComLib.dll
Report ID: 9d8df956-4b21-11e9-80c8-00155dc82141
Faulting package full name:
Faulting package-relative application ID:
This seems to indicate that the service is looking for ReferencedComLib.dll under C:\Windows\SYSTEM32...
But ReferencedComLib.dll is actually located under C:\Windows\SysWOW64 - it's a COM-library from third party (and their installer correctly installs it into SysWOW64)
Running under Local System
however this error does not even show up and the service runs without problems - and this problem is currently only reproducable on one stage, on all others it is running fine with Network Service
.
How could changing the service account running the service result in a faulting module?