Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Suppress exception
Message
From
09/01/2014 03:50:24
 
 
To
09/01/2014 01:25:16
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01591488
Message ID:
01591556
Views:
29
>Hi
>I tried the suggestion
>
>
>For Response.End, call the HttpContext.Current.ApplicationInstance.CompleteRequest method 
>instead of Response.End to bypass the code execution to the Application_EndRequest event.
>For Response.Redirect, use an overload, Response.Redirect(String url, bool endResponse) that 
>passes false for the endResponse parameter to suppress the internal call to Response.End. For example:
>
>
>The problem is, HttpContext.Current.ApplicationInstance.CompleteRequest doesn't actually stop the execution. The rest of code (same layer or caller layer( after this method call will be still been executed, which I don't want to.

So return after CompleteRequest() ?

>For Response.Redirect(String url, bool endResponse), it will still cause caller method able to catch ThreadAbortedException.

Not sure what you mean. Response.Redirect("somewhere",false) doesn't throw the ThreadAbortException.

>Most importantly, my redirect method would be called during callback. Which Response.Redirect() would not work.

Again not sure of your problem. What do you mean by 'callback' ?
Previous
Reply
Map
View

Click here to load this message in the networking platform