Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From the code, it seems that you're actually letting the browser do the download. In that scenario, I believe the option is to have shared access signatures valid for longer duration.</p> <p>Yet another idea is to have your code read the chunks of the blob and then transmit those chunks. That way if there's a need you could create a new SAS URI and use that if the SAS URI timeout has expired and the blob has not downloaded completely.</p> <p>Take a look at sample code below. Basically in this sample, I have a 200 MB blob. In loop, my code reads 1 MB chunk of the blob and sends that chunk down.</p> <pre><code> protected void ButtonDownload_Click(object sender, EventArgs e) { var blobUri = "http://127.0.0.1:10000/devstoreaccount1/abc/test2.vhd?sr=b&amp;st=2012-08-17T10%3A29%3A46Z&amp;se=2012-08-17T11%3A29%3A46Z&amp;sp=r&amp;sig=dn7cnFhP1xAPIq0gH6klc4nifqgk7jfOgb0hV5Koi4g%3D"; CloudBlockBlob blockBlob = new CloudBlockBlob(blobUri); var blobSize = 200 * 1024 * 1024; int blockSize = 1024 * 1024; Response.Clear(); Response.ContentType = "APPLICATION/OCTET-STREAM"; System.String disHeader = "Attachment; Filename=\"" + blockBlob.Name + "\""; Response.AppendHeader("Content-Disposition", disHeader); for (long offset = 0; offset &lt; blobSize; offset += blockSize) { using (var blobStream = blockBlob.OpenRead()) { if ((offset + blockSize) &gt; blobSize) blockSize = (int)(blobSize - offset); byte[] buffer = new byte[blockSize]; blobStream.Read(buffer, 0, buffer.Length); Response.BinaryWrite(buffer); Response.Flush(); } } Response.End(); } </code></pre> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload