title: Unexpected end of request content Kestrel ASP.NET Core
body: <p>I have a problem with sending large (20GB) file between two WebApi.</p>
  
  <p>WebAPI1 written in <code>ASP.NET 4.6</code></p>
  
  <p>WebAPI2 written in <code>ASP.NET Core 2.0</code></p>
  
  <p>When I am sending this file via Postman to WebAPI2 whole file is send. But when I am trying to send the file from WebAPI1 to WebAPI2 it fails (I am able to send files like 7GB though).</p>
  
  <p>During sending 20GB file I am receiving error in WebAPI2:</p>
  
  <pre><code>Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Unexpected
   end of request content.
     at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompl
  etion.ThrowFailed()
     at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.GetR
  esult(ReadResult&amp; result)
     at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.Micr
  osoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwai
  ter.GetResult()
     at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.ReadableB
  ufferAwaitable.GetResult()
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.&lt;ReadAs
  ync&gt;d__22.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
  ification(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameRequestStream.
  &lt;ReadAsyncInternal&gt;d__21.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
  ification(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
     at Microsoft.AspNetCore.WebUtilities.BufferedReadStream.&lt;EnsureBufferedAsync&gt;
  d__37.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
  ification(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
     at Microsoft.AspNetCore.WebUtilities.MultipartReaderStream.&lt;ReadAsync&gt;d__36.M
  oveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
  ification(Task task)
     at System.IO.Stream.&lt;CopyToAsyncInternal&gt;d__27.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
  ification(Task task)
  </code></pre>