Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement a secured download system?

What's the best way to implement a download system?

It needs to be integrated with an asp.net application.

I need the following features:

  1. Deliver files larger than 50mb
  2. Only users authorized by an asp.net login page can download
  3. Need to know if the user downloaded the whole file, or part of it
  4. Once the file is downloaded or canceled, the same url will not be available again

It's something similar to rapidshare I believe, but integrated with an asp.net application.

What would you guys suggest?

thanks!

like image 436
Bruno Avatar asked Dec 30 '25 07:12

Bruno


2 Answers

What if you hosted the files on a lighttpd server running modsecdownload, and used your asp.net app to generate the secure urls to the files on that server? That approach should handle items 1,2 and 4.

Not sure how you could tell from the server side that the download was completed successfully, maybe have some logic that parses the server logs?

like image 134
Max Avatar answered Jan 01 '26 03:01

Max


You could also use nginx and its X-Accel-Redirect feature. It's simple, and nginx is even more ridiculously fast and lightweight than lighttpd. A common setup at least in the Ruby and Python web world is to run nginx in front of lighttpd or Apache. nginx serves all static media and proxies dynamic request to the web server behind it.

like image 43
akaihola Avatar answered Jan 01 '26 03:01

akaihola



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!