Issue :'Thread is being aborted' when using Response.Redirect
FIX: If you want to get rid of this exception, use Response.Redirect(url, false).
Cause explanation:
Your page is executing by a thread on which asp.net worker process contains. And on some line in your code, an instruction (Response.Redirect) wants to stop the execution because it must be stopped and asp.net framework must be notified about a redirection request.
Asp.net framework catches the Redirect method's exception, aborts the thread and use a new thread for execution of to be redirected page.
This occurs when you specify the second argument of Redirect method as True. Because this means to asp.net framework as 'Stop this page's execution ASAP and execute to be redirected page'.
Ref:http://p2p.wrox.com/asp-net-1-0-1-1-basics/5684-thread-being-aborted.html
Subscribe to:
Post Comments (Atom)
Devops links
Build Versioning in Azure DevOps Pipelines
-
Build Versioning in Azure DevOps Pipelines
-
Generate Dates and hour between Date Range DECLARE @start DateTime = getdate() -1, @end DateTime = getdate(); ; WITH Dates_CTE ...
-
1. To get Simply the table names for a column name SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name like &...
No comments:
Post a Comment