User download file
-
Situation: I have a page that allows the user to click a file to download for a set time period. I want to allow the user to download the file but not allow him to copy the URL of the file to continue to download the file at a later date. What I originally did was use a StreamReader to send the data to the browser after I verified that the request was okay, change the content type, and sent it to the Response object. This worked 100% for the smaller files, however, some of these files are 150mb+ and the server hangs while trying to read such a large file. I know I can copy the file to a temporary directory, let the user download it by redirecting to that temporary URL, and then clean the temporary directory so the URL will no longer be valid. However, this seems like a bad idea for memory reasons. Whats some of my options for allowing the download of such a large file without being able to duplicate the URL? Thanks. Cody