title: The specified blob does not exist, using DownloadToStreamAsync
body: <p>I have a piece of code (in a UWP app) that reads a blob from Azure storage. I can connect, enumerate the container and find the blob, however when I try to download it I get the exception: <strong>The specified blob does not exist.</strong></p>
  
  <p>Using the Azure portal, I can browse the container, I see the blob and can even download interactively. I've checked the URL's and they match.
  I have other blobs in other folders in the same container, the code downloads them fine.</p>
  
  <p>The blob is created automatically via a Stream Analytics job, this is the same way the other blobs were created.</p>
  
  <pre><code>    string csvText = null;
  
      CloudStorageAccount storageAccount = CloudStorageAccount.Parse(CONNECTION_STRING);
      CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
      CloudBlobContainer container = blobClient.GetContainerReference(CONTAINER_NAME);
  
      OperationContext context = new OperationContext();
      BlobRequestOptions options = new BlobRequestOptions();
  
      string prefix = string.Format("{0}/{1:yyyy/MM/dd/HH}", ROOT_FOLDER, SAMPLE_DATE); // ex: telemetry/2016/12/31/22
      var blobs = await container.ListBlobsSegmentedAsync(prefix, true, BlobListingDetails.All, null, null, options, context);
  
      CloudBlockBlob item = blobs.Results.FirstOrDefault() as CloudBlockBlob; //     &lt;&lt;&lt;&lt; I see the blob here.
      using (var memoryStream = new MemoryStream())
      {
          await item.DownloadToStreamAsync(memoryStream); //     &lt;&lt;&lt;&lt; The specified blob does not exist.
          csvText = System.Text.Encoding.UTF8.GetString(memoryStream.ToArray());
      }
  </code></pre>
  
  <p>EDIT: Stack Trace:</p>
  
  <pre><code>Source  Microsoft.WindowsAzure.Storage
  at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.&lt;ExecuteAsyncInternal&gt;d__c`1.MoveNext()
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Microsoft.WindowsAzure.Storage.Blob.CloudBlob.&lt;&gt;c__DisplayClass11.&lt;&lt;DownloadRangeToStreamAsync&gt;b__10&gt;d__13.MoveNext()
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
  at HomeControl.Views.Historical.&lt;LoadData&gt;d__7.MoveNext()
  </code></pre>
  
  <p>I tried to get a fiddler trace, but was having trouble using it with a UWP app.
  Any suggestions on how I can troubleshoot this error?</p>
  
  <p>Thanks</p>
  
  <p>-John</p>