Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to password protect a file

Status
Not open for further replies.

fmrock

Programmer
Sep 5, 2006
510
US
I have been asked to add a new page to a website that has a link for downloading an exe.

The file could be located at


They would like this password protected so not anyone can get this file.

I can put a password on the page that has the links, but the url of that file would still be un protected.

What is the best way to password protect this file?

Thanks.
 
I figured you would have a response from somebody who knows something (rather than me) by now.

 
What about putting the password on a different page than the one with the links. Store the password in a database then check the password and open the links page if it validates. It's fairly straight forward.

Paul
 
But isn't that really just security through obscurity? If I guess the filename I can download it. And once I've been through the login once, I can just go directly to the link targets without any login fuss, right?

How do the big boys do it?

 
Yes and here's a related article:

ASP File Explorer by Adrian Forbes - 5/27/2003
Uses ADODB.Stream to open file from protected folder.
Gets the file extension's MIME type from the registry which of course could probably not be done on a shared Web host, but one could have a function to return the most common MIME types.

Best regards,
-Paul
- Freelance Web and Database Developer
- Classic ASP Design Tips
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top