【问题标题】:Debug Request Timed Out (System.Web.HttpException)调试请求超时 (System.Web.HttpException)
【发布时间】:2012-02-27 16:06:53
【问题描述】:

根据MSDN关于system.web httpRuntime executionTimeout:

This time-out applies only if the debug attribute in the compilation element is
False.  Therefore, if the debug attribute is True, you do not have to set this
attribute to a large value in order to avoid application shutdown while you are
debugging.

对于大多数调试来说,这是一个很棒的功能,因为它可以让请求在调试期间保持活动状态。如果我想自己调试超时错误怎么办?!无论我在任何地方设置什么超时属性,.NET 似乎都允许无限时间,所以我永远不会捕捉到要调试的异常!

【问题讨论】:

    标签: asp.net debugging timeout visual-studio-debugging


    【解决方案1】:

    如果您能够在本地生成长时间运行的执行,只需转到“调试”菜单,然后选择“全部中断”。然后您可以使用 Debug -> Windows -> Threads 视图查看所有活动线程。您可能能够确定需要这么长时间的原因。

    或者,您可以设置 Debug=false;然后将 Visual Studio 附加到您的进程,并将其设置为在抛出 ThreadAbortExceptions 的实例时中断。

    或者,当检测到长时间运行的执行时,您可以将 DebugDiag 设置为 capture a dump file。您可以使用 WinDbg (tough) 或 Visual Studio 2010 及更高版本来加载这些转储文件并检查程序的运行状态。

    最后,您可以尝试反思性地更改 RequestTimeoutManager 类的行为,该类会定期调用 TimeoutIfNeeded(DateTime now)。但是,我无法轻易找到一种方法来更改它以使用 debug=false 的行为。

    【讨论】:

      猜你喜欢
      • 2011-11-06
      • 1970-01-01
      • 1970-01-01
      • 2015-11-02
      • 1970-01-01
      • 1970-01-01
      • 2013-02-05
      • 1970-01-01
      • 2011-02-26
      相关资源
      最近更新 更多