3

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?

Miriam Farber
  • 18,986
  • 14
  • 61
  • 76
John
  • 33
  • 1
  • 7

1 Answers1

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();
  }
John
  • 33
  • 1
  • 7