Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. User download file

User download file

Scheduled Pinned Locked Moved ASP.NET
sysadminperformancequestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    codycaillet
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups