vinod patel
vinod patel

Reputation: 1

What is this Error In ASP.Net?

System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at System.Web.HttpResponse.Redirect(String url, Boolean endResponse) at System.Web.HttpResponse.Redirect(String url) at staticpages.btnsubmit_Click(Object sender, EventArgs e) in e:\Vinod\wwwroot\staticpages.master.cs:line 97

Upvotes: 0

Views: 104

Answers (3)

Mark Brackett
Mark Brackett

Reputation: 85655

Response.Redirect calls Thread.Abort internally to abort the current request. There's a few workarounds available if it bugs you.

Upvotes: 0

dparker
dparker

Reputation: 1082

The stack trace of the exception clearly indicates that a Response.Redirect is taking place. A simple try catch around that line of code should do the trick.

try
{
  Response.Redirect(somewhere);
}
catch (ThreadAbortException) { }

Upvotes: 0

John Saunders
John Saunders

Reputation: 161773

It probably means you're using Response.Redirect inside of a try/catch block. We can't tell for certain, since you did not supply us with the code.

Upvotes: 4

Related Questions