【发布时间】:2011-06-29 16:18:33
【问题描述】:
我有一个在发布模式下运行的 Windows 服务程序,它运行 24/7,它对 C++ 库进行一些进程内 COM 调用,偶尔它会崩溃,但 AppDomain.CurrentDomain.UnhandledException 事件不会触发。
相反,进程只是终止并写入了一条 EventLog 日志消息……但再次奇怪的是我的代码没有任何 EventLog.WriteEntry 调用。
有人能帮我弄清楚为什么 AppDomain.CurrentDomain.UnhandledException 在所有情况下都没有触发吗?
提前致谢
事件日志消息:
EventType clr20r3、P1 ProgramName.exe、P2 0.0.0.0、P3 4d5bd49f、P4 mscorlib、P5 2.0.0.0、P6 4a7cd8f7、P7 41b3、P8 a3、P9 system.argumentoutofrange、P10 NIL。
【问题讨论】:
标签: c# .net exception-handling