【问题标题】:system.threading .threadAbortException errorsystem.threading .threadAbortException 错误
【发布时间】:2017-09-11 08:07:20
【问题描述】:

我正在接管一个现有网站,并试图让该应用程序在我的机器上运行,但是我无法启动该应用程序,因为我收到以下错误。

System.Threading.ThreadAbortException occurred
HResult=0x80131530
Message=Thread was being aborted.
Source=mscorlib
StackTrace:
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)

这是我的代码

protected void Application_BeginRequest(object sender, EventArgs e) {
            if (DemoWeb.Helpers.Application.ApplicationManager.StartUpError != "") 
         {

           Response.Write("<div class=\"demoweb-securityerror\">" + demoweb.Helpers.Application.ApplicationManager.StartUpError + "</div>");
                Response.End();
          }

如何让它绕过 response.end?

【问题讨论】:

    标签: threadabortexception thread-exceptions


    【解决方案1】:

    我让它工作了。 我刚刚添加了一个 try and catch 方法并移动了 Response.End

    try {
      // code 
      }
    catch(exception ex)
      {
       Response.End();
      }
    

    【讨论】:

      猜你喜欢
      • 2011-05-27
      • 1970-01-01
      • 1970-01-01
      • 2015-02-11
      • 1970-01-01
      • 1970-01-01
      • 2011-06-07
      • 2011-09-17
      • 2011-08-19
      相关资源
      最近更新 更多