Third party ProcessRequest() like the one from Razor can wrap a
ThreadAbortException originated from response.Redirect().
stop_processing = true;
PipelineDone ();
} catch (Exception e) {
- ProcessError (e);
+ ThreadAbortException inner = e.InnerException as ThreadAbortException;
+ if (inner != null && FlagEnd.Value == inner.ExceptionState && !HttpRuntime.DomainUnloading) {
+ context.ClearError ();
+ Thread.ResetAbort ();
+ } else {
+ ProcessError (e);
+ }
stop_processing = true;
PipelineDone ();
}