How to restrict download of specified file types in

In this post i will show you how to restrict your web app so that .txt (whatever file extensions you want ) files can not be downloaded. Open your web.config file and register following setting in your web.config
       <add verb="*" path="*.txt" type="System.Web.HttpForbiddenHandler" />
For more details how to register handler in web.config check out this link

1 comment: