Using HttpForbiddenHandler to help securing resources
HttpForbiddenHandler can be used to restrict access to resources and files from being downloaded through HTTP.
Using <httpHandlers> in Machine.config
HTTP
handlers are responsible for processing Web requests for specific file
extensions. We can modify the <httpHandlers> section of
Machine.Config file (default path of Mahine.Config file is %windir%\Microsoft.NET\Framework\{version}\CONFIG) to forbid access to any specific file extension.
Ex.
Access to Web Services for a particular web server can be restricted by
setting .asmx file types to HttpForbiddenHandler in machine.config file
go to the <httpHandlers> section and add the following line :
<add verb="*" path="*.asmx" type="System.Web.HttpForbiddenHandler" />
0 comments: