Question

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

Is there any way to handle the request inside the event handler? Meaning, I don't just want to run code and keep the request moving -- I want to stop it dead in its tracks, return a 200 Status Code, and call it a day, without it request continuing to the next step in the pipeline.

Was it helpful?

Solution

HttpContext.Current.ApplicationInstance.CompleteRequest();

Documentation

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top