title: MemoryStream throws exception of type InvalidOperationException
body: <p>I hope that you can help :) </p>
  
  <p>In my MVC.net core 2.2, when debugging a simple:</p>
  
  <pre><code>MemoryStream ms = new MemoryStream();
  </code></pre>
  
  <p>Right after initialization it gives me a:</p>
  
  <pre><code>ReadTimeout: 'ms.ReadTimeout' threw an exception of type 'System.InvalidOperationException'
  WriteTimeout: 'ms.WriteTimeout' threw an exception of type 'System.InvalidOperationException'
  </code></pre>
  
  <p>Now the solution doesn't crash or anything. But if I inspect the "ms" in Visual Studio, that's what it says.</p>
  
  <p>What I'm trying to do is via SixLabors.ImageSharp do:</p>
  
  <pre><code>IFormFile file = viewModel.File.Image;
  
  using (Image&lt;Rgba32&gt; image = Image.Load(file.OpenReadStream()))
  using (var ms = new MemoryStream())
  {
      image.Mutate(x =&gt; x.Resize(1000, 1000));
      SixLabors.ImageSharp.Formats.Jpeg.JpegEncoder jpegEncoder = 
          new SixLabors.ImageSharp.Formats.Jpeg.JpegEncoder();
      jpegEncoder.Quality = 80;
  
      image.Save(ms, jpegEncoder);
  
      StorageCredentials storageCredentials = new StorageCredentials("Name", "KeyValue");
  
      // Create cloudstorage account by passing the storagecredentials
      CloudStorageAccount storageAccount = new CloudStorageAccount(storageCredentials, true);
  
      // Create the blob client.
      CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
  
      // Get reference to the blob container by passing the name by reading the value from the configuration (appsettings.json)
      CloudBlobContainer container = blobClient.GetContainerReference("storagefolder");
  
      // Get the reference to the block blob from the container
      CloudBlockBlob blockBlob = container.GetBlockBlobReference("image.jpg");
  
      await blockBlob.UploadFromStreamAsync(ms);
  }
  </code></pre>
  
  <p>But the saved stream is empty (when debugging there is values in Capacity, Length and Position. But after uploading it to azure blob storage, the size is 0).</p>
  
  <p>Kind regards
  Anda Hendriksen</p>