Use web.config httpHandlers to deny access to some file types
<system.web>
<httpHandlers>
<add verb="*" path="*.js" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="*.mdb" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="*.inc" type="System.Web.HttpForbiddenHandler" />
</httpHandlers>
</system.web>
Download Code...
Print Page