Last post Dec 03, 2007 11:41 AM by foreachbiscuit
Dec 03, 2007 11:24 AM|pr0ph3t|LINK
hi, is it possible to hide/mask certain files like pdf/flv/jpg in certain folders and allow to be viewed only by those who logged in? i can't do it via IIS but only via asp.net 2.0, so i can use authorization roles i have defined in my app. currently i'm
blocking this folder with web.config but only .aspx files getting redirected to login page and rest of files can be opened ON PRODUCTION server on other hand via Visual Studio i'm getting blocking browsing either .aspx or .jpg files.
sp basically i need a way to block certain media files while not using IIS or NTFS types of protection
thanks in advance, eugen
Dec 03, 2007 11:41 AM|foreachbiscuit|LINK
Your best option is a HttpHandler that is a "catch-all" for other file types.
You also need to set up IIS so that these extensions go to the aspnet_isapi.dll (in Configuration).
See this post for more details:
Simple File Handler