I have a .NET Windows service that was created using Visual Studio 2017 and tested on a Windows 7 PC.
I have now installed it on a Windows 10 PC, but when I start the service, I get the following error:
Visual Studio Just In Time Debugger:
An unhandled Microsoft .NET Framework exception occurred in 'MyService'. The Just-In-Time debugger was launched without necessary security permissions. To debug this process, the JIT debugger must be run as an administrator. Would you like to debug the process?
If I click Yes
, it attempts to start a new instance of Visual Studio 2010 which is not installed on the PC (and I cannot install it).
If I click No
, it aborts the service.
I cannot see any error in the Windows Events log.
How can I turn off the just-in-time debugger so that I can see meaningful debug messages from my windows service?
I have attempted to catch error or even log info to file but I do not see any output from either Trace or my log file does not get written to: