title: How to receive a large file(>2GB) in ASP .Net WebAPI with out multipart MIME type?
body: <p>Is there any way to implement a .net Web api to receive a lrage file(>2gb) using bufferlessinput stream without multipart/form-data mime type?</p>
  
  <p>I am trying to do it with below code, but its not reading the stream completely. I am trying to upload 100 MB file, but it writes only 10MB to "c:\sampl.zip" and comes out. what went wrong in below code?</p>
  
  <pre><code>        public async Task&lt;HttpResponseMessage&gt; FileReceive1r(string id)
          {
              var content = new StreamContent(HttpContext.Current.Request.GetBufferlessInputStream(true));
              Stream stream = HttpContext.Current.Request.GetBufferlessInputStream(true);
  
              StreamReader rdr = new StreamReader(stream);
              while(!rdr.EndOfStream)
              {
                  //FileStream fs = new FileStream(@"c:\sampl.zip", FileMode.OpenOrCreate);
                  StreamWriter wrtr = new StreamWriter(new FileStream(@"c:\sampl.zip", FileMode.OpenOrCreate));
                  wrtr.Write(rdr.ReadToEnd());
                  wrtr.Close();
              }
              rdr.Close();
              return await Task.FromResult(new HttpResponseMessage(HttpStatusCode.Created));
          }
  </code></pre>