I am learning about asp.net security pattern and practices. I got a code to deny download of some specific files with given extension using HttpForbiddenHandler. That’s OK but now I want to extend this functionality. I want to throw 404 error code when user tries to access some forbidden file.
<system.web>
<httpHandlers>
<add verb="*" path="*.mdb" type="System.Web.HttpForbiddenHandler" />
1 Answer