Providing downloads on ASP.net website

Posted by Dave on Stack Overflow See other posts from Stack Overflow or by Dave
Published on 2010-05-20T12:40:44Z Indexed on 2010/05/20 13:00 UTC
Read the original article Hit count: 218

Filed under:
|

I need to provide downloads of large files (upwards of 2 GB) on an ASP.net website. It has been some time since I've done something like this (I've been in the thick-client world for awhile now), and was wondering on current best practices for this. Ideally, I would like:

  • To be able to track download statistics: # of downloads is essential; actual bytes sent would be nice.
  • To provide downloads in a way that "plays nice" with third-party download managers. Many of our users have unreliable internet connections, and being able to resume a download is a must.
  • To allow multiple users to download the same file simultaneously.

My download files are not security-sensitive, so providing a direct link ("right-click to download...") is a possibility. Is just providing a direct link sufficient, letting IIS handle it, and then using some log analyzer service (any recommendations?) to compile and report the statistics? Or do I need to intercept the download request, store some info in a database, then send a custom Response? Or is there an ASP.net user control (built-in or third party) that does this? I appreciate all suggestions.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about file-download