views:

105

answers:

2

I manage a software download site, and we've been trying to find a good way to present the downloads to students. Due to licensing restrictions, there are a large number of downloads that should only be accessable to certain students or staff, and many of the files are dvd iso's or other large files. We started out by pushing all the downloads through code, but we found that files over 500 megs would just time out and die half way through. (I think part of this problem is related to using afs for a storage system instead of cifs, but I won't go into that...)

What I was looking at doing was giving users a temporary url to the file that is only good for x number of minutes. I've seen this used on other sites before, but I wasn't sure what was involved with setting it up.

So first off, is this a workable solution for my scenario? Or will we still run into problems? And what is the best method for going about doing this? Thanks!

+2  A: 

Something you could do is randomly generate a string in a database that corresponds to a file and do some sort of stealthed redirect to the actual file. This parameter would be passed as part of the query string and would allow you to invalidate urls however you like by performing any kind of checking before sending the file.

Chris Thompson
What if the file is being downloaded simultaneously ?
Braveyard
That's how I'm currently doing it... but all of my files are out on a publicly available web server, it wouldn't take much for someone to figure out where I'm redirecting them to and have access to all of the files in our download system.
Arthurdent510
A: 

Well, as you haven't mentioned about the IIS version, you may take a look at

http://learn.iis.net/page.aspx/389/configuring-ftp-with-net-membership-authentication/

This article explains how to configure FTP server for ASP.NET Membership authentication. If you set this up, you can restrict the files based on roles.

Also, I doubt how you would implement a anonymous url solution without pushing the downloads through code.

Ramesh