title: Azure Blob Upload not working in ASP .Net Core Application
body: <p>I am trying to upload a file to Azure blob storage in Asp .Net Core. Everything seems to be working but no file is uploaded. Here is my code snippet:</p>
  
  <pre><code>        var blobReference = GetBlobReference();
          rawData.Position = 0;
  
          //  var result = blobReference.UploadFromStreamAsync(rawData);
          var result = blobReference.UploadFromFileAsync("C:\\users\\tjaartb\\Downloads\\DebitOrderMandate.pdf");
          result.GetAwaiter().GetResult();
          var blobPath = blobReference.Uri.ToString();
  </code></pre>
  
  <h2>What's happening?</h2>
  
  <p>The debugger steps over the <code>result.GetAwaiter().GetResult()</code> with no exceptions occurring. Checking the <code>result</code> Task variable after the <code>GetResult()</code> call shows that the task state is <code>RanToCompletion</code> and the exception property is blank. My blob container is created successfully in earlier code indicating that the connection to blob storage is successful. <code>GetResult()</code> finishes instantly, so it seems like nothing is happening.</p>
  
  <h2>Things I've checked</h2>
  
  <ul>
  <li><code>rawData</code> is a <code>MemoryStream</code> that is populated with file data. Using the commented line to try and upload via a stream is not successful either.</li>
  <li>The connection to Azure is working.</li>
  <li>The file path exists.</li>
  <li>There are no exceptions thrown.</li>
  <li>The only thing in my debug window output is <code>Started Thread &lt;ThreadNumber&gt;</code></li>
  <li>Putting an invalid path in the call to <code>blobReference.UploadFromFileAsync()</code> throws a <code>FileNotFoundException</code> as expected.</li>
  <li>I've tried downgrading my project to <code>netcoreapp2.0</code> from <code>netcoreapp2.1</code> with no success.</li>
  </ul>