Blogger Widgets
  • Sharing Photos using SignalR
  • TFS Extenstion - allows copy work items between projects
  • Displaying jquery progressbar with ajax call on a modal dialog
  • Managing windows services of a server via a website
  • Exploring technologies available to date. TechCipher is one place that any professional would like to visit, either to get an overview or to have better understanding.

Search This Blog

Thursday, 26 August 2010

"Response.Redirect" or "Server.Transfer" raises ThreadAbortException

Both methods calls Response.End method internally ends the page execution. Then executes Application_EndRequest event in the application's event pipeline and hence the line of code that follows Response.End is not executed which is raising the exception.

To overcome this just disable Response.End in both methods as follows :-

Server.Transfer(Request.FilePath);
Response.Redirect(Request.FilePath);

to

Server.Execute(Request.FilePath);
Response.Redirect(Request.FilePath,false);

Computers are composed of nothing more than logic gates stretched out to the horizon in a vast numerical irrigation system.


Stan Augarten

1 comments:

Copyright © 2013 Template Doctor . Designed by Malith Madushanka - Cool Blogger Tutorials | Code by CBT | Images by by HQ Wallpapers