system.threading .threadAbortException error

0

I am taking over an existing website and I am trying to get the application running on my machine, however I can't launch the application because I get the following error.

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)

This is my code

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();
          }

How can I get it to bypass the response.end?

threadabortexception
thread-exceptions
asked on Stack Overflow Sep 11, 2017 by John • edited Sep 11, 2017 by Miriam Farber

1 Answer

0

I got it to work. I just added a try and catch method and moved the Response.End

try {
  // code 
  }
catch(exception ex)
  {
   Response.End();
  }
answered on Stack Overflow Sep 11, 2017 by John

User contributions licensed under CC BY-SA 3.0