How to create Large resumable download from a secured location .NET -


I'm not exactly a .NET coder for preface, but need to get partial functionality, I A TechNet chunkedfilefetch uses the .aspx script chunked to read data and read. IStream = new System.IO.FileStream (path, writing the stream method of transferring System.IO.FileMode file, to get me half way .Open, _OO.FileAccess.Read, IO.FileShare.Read) dataToRead = iStream.Length Response.ContentType = "Application / Octet Section" Response.AddHeader ("Content-Length", file.Length.ToString ()) Response.AddHeader ("Content-Displacement", " Attachment; filename = "and filed download)" Read and send 16,000 bytes to the file at one time. 'DataToRead> 0 Response.IsClientConnected then length = iStream.Read (buffer, 0, 16000) Response.OutputStream.Write (Buffer, 0, Length) Response.Flush () ReDim buffer (16000)' Clear buffer 'dataToRead = DataToRead - 'Stop Infinite Loop if the user disconnects' dataToRead = -1 end if end

It works well on files up to 2 GB and is working perfectly now .. but only one problem does not allow it to start again.

I brought it the original code which it is called fetch.aspx and passes the order NUM via url. Fetch.aspx and ordernum = xxxxxxx This then reads the file name / location according to the order in the database, and it is not exempted from the safe location under Webroot

I can not use it again by the nature of the Internet. Need to start with and large files are always disconnected and want to resume again where they left off. But any restarted article that I read has taken the file, it is within WebRot .. i.e. great article and works well, but I need to stream from a safe place.

I am not a net codeak at all, the best I can be associated with a little cold, if someone can help me, a handler, I appreciate it.

Prerequisites:

  • I have a working fetch.aspx script that works well and supports the above code code to download a streaming.
  • Download files are 600MB and they are stored in a secure location outside the WebRot.
  • Click on fetch.aspx to start the user download, and so it will have to click again if it was unsuccessful if an ASPX and file is being sent then that is AV Clicking on IHTP handler is completely bypassing IFTP mapping to IFTPT handler, so it confuses me
  • I understand what the browser will read and match match value and file no. To determine the date of the date that they are talking about the same file, then the exchange between the accept-range browser and the IIS is done later. Since this dialogue is with IIS, we have to respond to the use of a handler and respond accordingly, but after clicking on the link it is sent to the ASPX file, on which the elephant should have AVI well . Apart from this, misleading me too
  • If there is a way to request initial HTTP requests header, accept-range in normal ASPX file, I can read those values ​​and if the acceptable range and etag exists, then Byte value somehow? But due to the lost at the IIS level, I could not find any way to transfer the HTTP request header.

  • The order given in the URL string is unique and ETag

      Response.AddHeader ("ETag", request ("ORDERNUM") 
  • Li>
  • >

Any help will be really appreciated, I am reading and reading and downloading the code, but any instance of my status being displayed from outside the web portal Does not complete with the original file. Please help me handle InlandFanders :)


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -