title: Multipart POST error: Either BinaryRead, Form, Files, or InputStream was accessed before the internal storage was filled
body: <p>From my MVC app I am trying to do a POST request to my Web API app. After receiving the data inside Web API app, when I try to read it like <code>HttpContext.Current.Request.Form["SenderAddress"];</code> I get an error saying <code>Either BinaryRead, Form, Files, or InputStream was accessed before the internal storage was filled by the caller of HttpRequest.GetBufferedInputStream.</code> Below is the code for both sending and receiving:  </p>
  
  <p>POST request (from MVC):  </p>
  
  <pre><code>var form = new MultipartFormDataContent();
  var uri = _domain + "/api/email/send";
  
  //adding all properties to the form
  if (model.SenderAddress != "" &amp;&amp; model.SenderAddress != null)
      form.Add(new StringContent(model.SenderAddress), "SenderAddress");  
  if (model.Recipients.FirstOrDefault() != null)
  {
      foreach (var recipient in model.Recipients)
          form.Add(new StringContent(recipient), "Recipients");
  }  
  if (model.Attachments.FirstOrDefault() != null)
  {
      foreach (var attachment in model.Attachments)
      {
          byte[] fileData = null;
          using (var binaryReader = new BinaryReader(attachment.InputStream))
          {
              fileData = binaryReader.ReadBytes(attachment.ContentLength);
          }
          form.Add(new ByteArrayContent(fileData, 0, fileData.Length), "Attachments", attachment.FileName);
      }
  }  
  HttpResponseMessage response = await client.PostAsync(uri, form);
  response.EnsureSuccessStatusCode();
  string sd = response.Content.ReadAsStringAsync().Result;  
  </code></pre>
  
  <p>Receiving data (at Web API):  </p>
  
  <pre><code>var temp3 = HttpContext.Current.Request.Form["SenderAddress"];  
  </code></pre>
  
  <p>Here I get that error. How do I solve it?</p>