Author: GraceWink | Posted on: 12/30/2008 12:50:18 AM | Views : 366

Hi there
I'm fairly new to .NET and web programming in general and stumbled upon something that I hope you can help me with.
In order to protect or documents and pdf files from unauthorized viewing, I created a custom HTTPHandler that redirects any attempt to open the file directly in the browser to a "Access is Denied" page. this means that if a user types "www.myWebsite.net/files/testFile.doc" he should not be able to view the file. I used the following article to help me out: http://www.code-magazine.com/article.aspx?quickid=0703031&page=3

The following is my entry in web.config

          <httpHandlers>
          <add verb="*" path="*.doc" type="FileDenialHandler"/>
           ...

Go to the complete details ...