Author: gmmo1971 | Posted on: 8/24/2009 5:40:11 PM | Views : 234

I've been trying to protect a diretory (where my media files are) from direct download, but I guess I don't understand how the web.config file works.


Here's what I've been hacking:
I have a section of my web-config file this:



<location path="~/media_files/protected_files" allowOverride="false"> <system.web> <authorization> <deny users="?" /> <allow roles="superuser"/> <deny users="*" /> </authorization> </system.web> </location>
and inside this path I have some zips,
www.???.com/media_files/protected_files/zip1.zip


but if the user simply points the browser to the zip1.zip file, it downloads no pro ...

Go to the complete details ...