My C# application is returning 0xE0434352 to Windows Task Scheduler but it is not crashing

后端 未结 11 1207
悲哀的现实
悲哀的现实 2020-11-27 15:13

I have written a few C# apps that I have running via windows task scheduler. They are running successfully (as I can see from the log files that they are writing ) but windo

11条回答
  •  广开言路
    2020-11-27 15:53

    I encountered this problem when working with COM objects. Under certain circumstances (my fault), I destroyed an external .EXE process, in a parallel thread, a variable tried to access the com interface app.method and a COM-level crash occurred. Task Scheduler noticed this and shut down the app. But if you run the app in the console and don't handle the exception, the app will continue to work ...

    Please note that if you use unmanaged code or external objects (AD, Socket, COM ...), you need to monitor them!

提交回复
热议问题