Reply
Secure Directory
Old 06-02-2006, 03:06 PM Secure Directory
The Dorian's Avatar
Skilled Talker

Posts: 74
Location: Orange County, California
Hi Guys,

I need to restrict access to all files within a particular directory...including image and jpeg files.

The username's and passwords are stored in a SQL database. Restricting access to .aspx files is easy, but I'm not sure how I should restrict access to the directory.

Any thoughts?

Thanks in advance for your help!
__________________
Dorian Collier
my blog - dorkian.com
Free Pay-Per-Click ROI Calculator
The Dorian is offline
Reply With Quote
View Public Profile Visit The Dorian's homepage!
 
When You Register, These Ads Go Away!
     
Old 06-02-2006, 04:29 PM Re: Secure Directory
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Firstly, store the files in a directory that isn't accessable from the web.

You can then write ASPX pages that firstly handle the authentication, and then load the file and write it out directly to the response stream.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Inoxia Pyrotechnics Supplies | Surrey Angels Cheerleading Squad
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 06-07-2006, 02:49 AM Re: Secure Directory
Novice Talker

Posts: 5
You can do it by placing a web.config file in that folder restricting access to all contents of it and any children folders (unless you place another web.config file further down the tree).

There's a tutorial here that should help you out. It explains how to use forms authentication and even shows how to use usernames and passwords from a database through SQL.
__________________
Daniel Punch
M6.Net - PHP MySQL Hosting
Punch is offline
Reply With Quote
View Public Profile Visit Punch's homepage!
 
Reply     « Reply to Secure Directory
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13754 seconds with 13 queries