.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.

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...