Click to See Complete Forum and Search --> : How to prevent public users to download file?


techissue2008
08-19-2008, 05:25 AM
Hi

I would like to prevent public users to download avi files from my personal website. I have a photo album, people can view the images. When clicking it, it requests users login and able to download the corresponding avi file. The avi file size is around 50MB. Need to handle concurrent download.

e.g. user login -> click image in photo album -> http://www.dl.com/images/abc.jpg -> download and SAVE AS dialog box open -> http://www.dl.com/video/abc.avi

If user does not login -> click -> http://www.dl.com/images/abc.jpg -> NOT allow to download

But, how can I prevent user directly open url of http://www.dl.com/video/abc.avi to download without login?

Do I need to change the file name from abc.avi to a temp file name 234lkh8yihiafr.avi for download?

I use .NET 2.0, ASP.NET, C# and MSSQL2005.

How can I do it?

Eye for Video
08-20-2008, 10:45 PM
I couldn't get the links to open so I'm not exactly sure what the pages look like. But since you are using a login, can't you just validate the user ID on the video page? Or if you have a seperate log in page that directs to the video page, set a server side script to check that the request is coming from the (validated) log in page. All other attempts to access will be denied. Seen this done with PHP so you could probably duplicate something like that.
EfV