Source: Demtron Blog

Demtron Blog Thread aborted using Response.Redirect in ASP.Net

I added a Response.Redirect to a .Net Web page and began receiving a "Thread was being aborted" error on a line of code that executed Response.Redirect. Without really considering it, this error made sense based on the place where I added the code.Response.Redirect will call Response.End by design. However, this will also raise a ThreadAbortException. In my case, it was because the redirect line was within a try...catch block. I found two ways to handle this:Change Response.Redirect(<URL>) to Response.Redirect(<URL>, false)Move the line to outside the try...catch blockI ended up using method #2, but both options worked for me.

Read full article »
Est. Annual Revenue
$25-100M
Est. Employees
100-250
CEO Avatar

CEO

Update CEO

CEO Approval Rating

- -/100