Tutorials
Resources
Forum
Reviews
Communities
Interview
Jobs
Projects
Training
Your
Ad
Here
Silverlight Games
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Polls
|
Revenue Sharing
|
Lobby
|
Gift Shop
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
srinivas kante...
(67)
Alwyn
(64)
Abhisek Panda
(42)
Last 7 Days
Alwyn
(728)
nishithraj
(512)
Gaurav Arora
(503)
more...
Resources
»
Errors and Solutions
»
General
»
Response.Redirect raises ThreadAbortedException
Posted Date: 16 Sep 2009
Resource Type:
Errors and Solutions
Category:
General
Author:
Sudeep Syamnath
Member Level:
Silver
Rating:
Points
: 4
Error
While using Response.Redirect("url") a ThreadAbortedException is raised. Due to this error, whatever code is written after Response.Redirect("url") will not execute
Reason
Response.Redirect("url") internally invokes Response.End() which aborts the current thread. This causes the ThreadAbortedException
Solution
Response.Redirect has another overload which takes a boolean value as second parameter other than the url as the first parameter. The boolean value depicts whether to end the current response or not. If false is passed then the current response is not ended.
After this the application instance of the current context can be accessed and the request can be completed.
Code
Response.Redirect("url",false);
HttpContext.Current.ApplicationInstance.CompleteRequest();
Best Regards,
Sudeep Syamnath
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
to add tags.
Thread aborted exception in Response.Redirect
.
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
MS SQl server as project prerequisite installation error
Previous Resource:
Ajax Tool kit not working
Return to Discussion Resource Index
Post New Resource
Category:
General
Post resources and
earn money
!
More Resources
MS SQl server as project prerequisite installation error
Error attaching an mdf file - compressed but does not reside in a read-only database or filegroup
Smtp - Error while sending mail from smtp
Instructions how to Validate your non-original WINDOWS XP
Cannot access destination table 'table-name' Error – During SqlBulkCopy
SQL BULK COPY error: invalid attempt to call fieldcount when reader is closed Error
dotNet Slackers
About Us
Contact Us
Privacy Policy
Terms Of Use