How to prevent download

S

Shahid Saleem

Dear Members

I have an asp.net application , we are selling certein articles on net
(saved in pdf files) files are located in a folder on server, only the
authenticated user are allowed to downlod the file (A link in the member
area), Problem is when a user download a file he get the static link and
later he can use this link in download accleator to directly download
the file. how can we prevent such downloads , any help.

Best Regards
Shahid Saleem
 
H

Hans Kesting

Shahid said:
Dear Members

I have an asp.net application , we are selling certein articles on net
(saved in pdf files) files are located in a folder on server, only the
authenticated user are allowed to downlod the file (A link in the
member area), Problem is when a user download a file he get the
static link and later he can use this link in download accleator to
directly download the file. how can we prevent such downloads , any
help.

Best Regards
Shahid Saleem

Store the files outside of the website, have an "upload.aspx" with parameters
to identify the file that should be uploaded, perform any permission checks
you want, and use Response.WriteFile to send the file to the user.

Hans Kesting
 
J

jasonkester

You could lock down the directory with an ISAPI filter. Or simply
store them elsewhere and drop a custom 404 handler into your app that
sniffs for .pdf extensions and serves files from your alternate
location after checking security.

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top