问题描述
我工作的一个asp.net应用程序。当我尝试编译和运行应用程序;它成功运行。
I am working on an asp.net application.. when I try to compile and run the application; it runs successfully.
但是,当我尝试调试应用程序它给我的错误在任何点 -
But when I try to debug the application it gives me error at any point -
有一个第一次机会异常的类型'System.Threading.ThreadAbortException在mscorlib.dll中发生
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
它不以任何特定的code线给错误..它给这个错误的行(不知道)的任何code ..然后网页显示 - 服务器应用程序不可用错误
It doesnt give error at any specific code line.. it gives this error at any code of line (not sure).. and then web page display - "Server Application Unavailable" error.
甚至当我尝试分析/立即窗口执行一些语句/快速腕表 - 它给了我上面的错误。
Even when I try to parse/execute some statement in immediate window / quick watch - it gives me above error..
例如,我装一个XML文档(超过10000行)中的XElement,当我尝试检查直通的XPath作为XElementObj.XPathSelectElement一些属性值(/ ASDF / ASD / wqer / XYZ)..它给上述错误。(不是所有的时间,但随机)。
for example, I loaded an xml document (of more than 10000 lines) in XElement and when I try to check some attribute value thru xpath as XElementObj.XPathSelectElement("/asdf/asd/wqer/xyz").. it gives above error.. (not all the time but randomly).
有这个想法的任何人..请帮助。
anybody having any idea on this.. please help.
推荐答案
我有类似的东西,发现的:
I had something similar, and found this answer from another question:
如果你想找出其中 异常发生,你可以 选择调试 - >例外菜单 项,然后在出现的对话框中, 选中第一个复选框为通用 语言运行时例外。这 会使调试突破,尽快 作为发生异常时,代替仅 打破未处理的异常。
这也是原因之一是 通常是一个坏主意,赶上通用 除非你异常明显 日志记录信息一网打尽。
This is also one reason why it is generally a bad idea to catch generic exceptions unless you are clearly logging the information caught.
这篇关于第一次机会异常的类型'System.Threading.ThreadAbortException“在mscorlib.dll中发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!