I have used custom HTTP handlers to provide this feature in the past. I created the download.axd file and wrote a simple HttpHandler.
public class DownloadHandler : IHttpHandler { public void ProcessRequest(HttpContext context) {
Important information about the TransmitFile method is that it sends the file in response without storing the file in memory. This will be important in your case, as you are dealing with large files.
You also need to register the handler in your web.config:
<httpHandlers> <add verb="GET,HEAD" path="download.axd" type="DownloadHandler, MyAssemby"/> </httpHandlers>
Still using this approach, it will be difficult to track the actual bytes sent to each user downloading.
source share