Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Suppress exception
Message
De
09/01/2014 03:50:24
 
 
À
09/01/2014 01:25:16
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01591488
Message ID:
01591556
Vues:
31
>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' ?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform