title: Azure download blob filestream/memorystream
body: <p>I want users to be able to download blobs from my website. I want the fastest/cheapeast/best way to do this.</p>
  
  <p>Heres what i came up with:</p>
  
  <pre><code>        CloudBlobContainer blobContainer = CloudStorageServices.GetCloudBlobsContainer();
  
          CloudBlockBlob blob = blobContainer.GetBlockBlobReference(blobName);
          MemoryStream memStream = new MemoryStream();
          blob.DownloadToStream(memStream);
  
          Response.ContentType = blob.Properties.ContentType;
          Response.AddHeader("Content-Disposition", "Attachment; filename=" + fileName + fileExtension);
          Response.AddHeader("Content-Length", (blob.Properties.Length).ToString());
          Response.BinaryWrite(memStream.ToArray());
          Response.End();
  </code></pre>
  
  <p>I'm using memorystream now but im guessing i should go with filestream because off the blobs being, in some cases, large.. Right?</p>
  
  <p>I tried it with filestream but I failed miserable.. Think you could give me some code for filestream?</p>