hankknight
asked on
ASP.NET/C#: Exit from CustomHttpModule
Using ASP.NET/C# I have a custom CustomHttpModule, referenced in web.config like this:
I send the 404 header like this:
How can I exit the application from the CustomHttpModule?
<add name="CustomHttpModule" type="org.HeaderHack.CustomHeaderModule" />
If certain criteria are met, I want to send a 404 header and exit.I send the 404 header like this:
HttpContext.Current.Response.StatusCode = 404;
The problem is that the application continues after the 404 header is sent.How can I exit the application from the CustomHttpModule?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.