1

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

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?

4

1 回答 1

0

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

try {
  // code 
  }
catch(exception ex)
  {
   Response.End();
  }
于 2017-09-11T08:36:07.393 回答