Newsgroups: microsoft.public.vsnet.debugging
From: yhhu...@online.microsoft.com (Yan-Hong Huang[MSFT])
Date: Wed, 10 Sep 2003 10:34:23 GMT
Local: Wed, Sep 10 2003 6:34 am
Subject: RE: ThreadAbortException
Hi Tom,
Since there is a KB on it, it is a known issue already. You could refer to In this article, we could see that So please use Response.Redirect(URL, false) instead. If it causes AV error, Thanks very much. Best regards, Get Secure! - www.microsoft.com/security -------------------- !>-----Original Message-----
!>Hello Tom, !> !>Thanks for posting in the group. !> !>In ASP.NET 1.0 and 1.1, If you use the Response.End, !Response.Redirect, or !>Server.Transfer method, a ThreadAbortException exception !occurs. You can !>use a try-catch statement to catch this exception. . !> !>The cause of this issue is that the Response.End method !ends the page !>execution and shifts the execution to the !Application_EndRequest event in !>the application's event pipeline. The line of code that !follows !>Response.End is not executed. !> !>This problem occurs in the Response.Redirect and !Server.Transfer methods !>because both methods call Response.End internally. !> !>The way you used is correct to resolve this issue. For !details, please !>refer to MSDN article: !>"PRB: ThreadAbortException Occurs If You Use !Response.End, !>Response.Redirect, or Server.Transfer" !>http://support.microsoft.com/default.aspx?scid=kb;en- !us;q312629 !> !>However, if the exception is not caused by this issue, !then it won't !>resolve it. So please make sure that ThreadAbortException !is caused by !>Response.Redirect. I think you could test with a simple !aspx page first. !> !>Does this answer your question? !> !>Best regards, !>Yanhong Huang !>Microsoft Online Partner Support !> !>Get Secure! - www.microsoft.com/security !>This posting is provided "AS IS" with no warranties, and !confers no rights. !> !>-------------------- !>!Content-Class: urn:content-classes:message !>!From: "Tom" <dari...@fhlbcin.com> !>!Sender: "Tom" <dari...@fhlbcin.com> !>!Subject: ThreadAbortException !>!Date: Mon, 8 Sep 2003 06:48:49 -0700 !>!Lines: 23 !>!Message-ID: <397a01c3760f$eec3eb30$a3012...@phx.gbl> !>!MIME-Version: 1.0 !>!Content-Type: text/plain; !>! charset="iso-8859-1" !>!Content-Transfer-Encoding: 7bit !>!X-Newsreader: Microsoft CDO for Windows 2000 !>!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 !>!Thread-Index: AcN2D+7DEUmZiBdzRJGF6l57eoxCLw== !>!Newsgroups: microsoft.public.vsnet.debugging !>!Path: cpmsftngxa06.phx.gbl !>!Xref: cpmsftngxa06.phx.gbl !microsoft.public.vsnet.debugging:3292 !>!NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163 !>!X-Tomcat-NG: microsoft.public.vsnet.debugging !>! !>!I have read an article on Google that talks about this !>!error when trying to do a Response.Redirect in .NET. !>! !>!The artice says if you use the overload the method and !>!send in a "false" as a second parameter that the error !is !>!suppressed and you are redirected. !>! !>!ie. !>!Response.Redirect(Application !>!["ServerNameReadOnly"].ToString(),false); !>! !>!But I have found this to be false. !>! !>!I am still getting a "ThreadAbortException" error thrown !>!when I try to redirect using the code above. !>! !>! !>!Can anyone advise? !>! !>!Thanks !>! !>!Tom !>! !>! !> !>. !> ! You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||