title: Object is disposed after PostAsync with HttpClient
body: <p>I'm trying to send a file with HttpClient and if something on the receiving side fails I want to resend the same file stream.</p>
  
  <p>I'm creating a post request with a MultipartFormDataContent, which contains the stream.
  Everything looks fine when I call PostAsync for the first time. But when I try to repeat the request I get System.ObjectDisposedException.</p>
  
  <p>My file stream is disposed after the first call of PostAsync... Why and is there a solution to my problem?</p>
  
  <p>Here is basic example of what am I talking about.</p>
  
  <pre><code>    public ActionResult Index()
      {
          var client = new HttpClient { BaseAddress = new Uri(Request.Url.AbsoluteUri) };
  
          var fi = new FileInfo(@"c:\json.zip");
  
          using (var stream = fi.OpenRead())
          {
              var content = new MultipartFormDataContent();
              var streamContent = new StreamContent(stream);
              streamContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
              streamContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data")
              {
                  FileName = "\"File\""
              };
  
              content.Add(streamContent);
  
              var isSuccess = client.PostAsync("Home/Put", content).
                  ContinueWith(x =&gt; x.Result.Content.ReadAsAsync&lt;JsonResponse&gt;().Result.Success).Result;
              //stream is already disposed
  
              if (!isSuccess)
              {
                  isSuccess = client.PostAsync("Home/Put", content).
                      ContinueWith(x =&gt; x.Result.Content.ReadAsAsync&lt;JsonResponse&gt;().Result.Success).Result;
              }
          }
  
          return View();
      }
  
      public JsonResult Put(HttpPostedFileBase file)
      {
          return Json(new JsonResponse { Success = false });
      }
  </code></pre>