微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

.net – 在mscorlib.dll中发生类型“System.Threading.ThreadAbortException”的第一次机会异常

我正在开发asp.net应用程序..当我尝试编译和运行应用程序;它运行成功。

但是当我尝试调试应用程序时,会给我任何错误

mscorlib.dll中出现了“System.Threading.ThreadAbortException”类型的第一个机会异常

它不会在任何特定的代码错误。它给出任何代码行(不确定)..然后网页显示 – “服务器应用程序不可用”错误错误

即使我试图在即时窗口/快速观察中解析/执行一些声明 – 它给我上面的错误..

例如,我在XElement中加载了一个xml文档(超过10000行),当我尝试通过xpath检查一些属性值为XElementObj.XPathSelectElement(“/ asdf / asd / wqer / xyz”)..它给出了上面的错误(不是所有的时间,而是随机)。

任何人有任何想法这个..请帮助。

我有类似的东西,从另一个问题发现了 this answer

If you want to pinpoint where the
exceptions are occurring,you can
select the Debug->Exceptions menu
item,and in the dialog that appears,
check the first checkBox for “Common
Language Runtime Exceptions”. This
will make the debugger break as soon
as an exception occurs instead of only
breaking on unhandled exceptions.

This is also one reason why it is generally a bad idea to catch generic exceptions unless you are clearly logging the information caught.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐