我有一个 Windows 窗体应用程序 (.NET C# 3.5)...引发错误..但我有 2 个场景:
客户端:在客户端..错误被记录到 log.txt 文件中..并且出现错误弹出消息
有关调用即时 (JIT) 调试而不是此对话框的详细信息,请参阅此消息的末尾。
**************** 异常文本 **************
System.Threading.ThreadAbortException:线程正在被中止。
在 System.Windows.Forms.Internal.IntUnsafeNativeMethods.IntSaveDC(HandleRef hDC)
...
本地:在我的本地计算机中...当应用程序抛出错误时,它会记录到 log.txt 文件中..但我不'我没有看到任何弹出消息...
所以..我想知道,我是否有一些 Windows 选项:不抛出未处理的错误?
注意:我不认为这是应用程序中的问题,因为构建版本完全相同。所以它一定是环境中的某种东西。
I have a windows forms application (.NET C# 3.5)... that is throwing an error.. but I have 2 scenarios:
Client: on the client side.. the error is logged into a log.txt file.. AND an error pop up message appears
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Windows.Forms.Internal.IntUnsafeNativeMethods.IntSaveDC(HandleRef hDC)
...
Local: in my local computer... when the application throws the error, it is logged to the log.txt file.. but I DON'T see any pop up message...
so.. I was wondering, if maybe I have some Windows option to: NOT THROW unhandled errors ?
Note: I don't think it is something in the application, because the build is exactly the same version. so it must be something in the environment.
发布评论
评论(1)
.Net v1.1 和 v2.0 之间线程上未处理异常的处理方式发生了变化。听起来你的机器上正在使用 v1.1 模型,异常被吞掉了。您的 machine.config 或 app.config 文件中是否有标记
?There was a change in how unhandled exceptions were treated on threads between v1.1 and v2.0 of .Net. It sounds like on your machine, the v1.1 model is being used, where the exception is swallowed. Do you have the tag
<legacyUnhandledExceptionPolicy enabled='1'/>
in your machine.config or app.config file?