Can the request be processed and terminated early, at the beginning of the pipeline?

I have an HttpModule that has bound an event handler to an EndRequest.

Is there a way to handle the request inside the event handler? Meaning, I do not just want to run the code and keep the request moving - I want to stop it dead on my tracks, return the status code 200 and call it day, without asking it to continue the next step in the pipelines.

+5
source share
1 answer

HttpContext.Current.ApplicationInstance.CompleteRequest();

Documentation

+6
source

All Articles