{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/520","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/520/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/520/comments","events_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/520/events","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/520","id":123492954,"number":520,"title":"System.IO.InvalidDataException in Kestrel.Http.MessageBody when posting large file","user":{"login":"davenewza","id":6212830,"avatar_url":"https://avatars.githubusercontent.com/u/6212830?v=3","gravatar_id":"","url":"https://api.github.com/users/davenewza","html_url":"https://github.com/davenewza","followers_url":"https://api.github.com/users/davenewza/followers","following_url":"https://api.github.com/users/davenewza/following{/other_user}","gists_url":"https://api.github.com/users/davenewza/gists{/gist_id}","starred_url":"https://api.github.com/users/davenewza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davenewza/subscriptions","organizations_url":"https://api.github.com/users/davenewza/orgs","repos_url":"https://api.github.com/users/davenewza/repos","events_url":"https://api.github.com/users/davenewza/events{/privacy}","received_events_url":"https://api.github.com/users/davenewza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"halter73","id":54385,"avatar_url":"https://avatars.githubusercontent.com/u/54385?v=3","gravatar_id":"","url":"https://api.github.com/users/halter73","html_url":"https://github.com/halter73","followers_url":"https://api.github.com/users/halter73/followers","following_url":"https://api.github.com/users/halter73/following{/other_user}","gists_url":"https://api.github.com/users/halter73/gists{/gist_id}","starred_url":"https://api.github.com/users/halter73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halter73/subscriptions","organizations_url":"https://api.github.com/users/halter73/orgs","repos_url":"https://api.github.com/users/halter73/repos","events_url":"https://api.github.com/users/halter73/events{/privacy}","received_events_url":"https://api.github.com/users/halter73/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/milestones/15","html_url":"https://github.com/aspnet/KestrelHttpServer/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/milestones/15/labels","id":1377644,"number":15,"title":"1.0.0-rc2","description":null,"creator":{"login":"muratg","id":1808428,"avatar_url":"https://avatars.githubusercontent.com/u/1808428?v=3","gravatar_id":"","url":"https://api.github.com/users/muratg","html_url":"https://github.com/muratg","followers_url":"https://api.github.com/users/muratg/followers","following_url":"https://api.github.com/users/muratg/following{/other_user}","gists_url":"https://api.github.com/users/muratg/gists{/gist_id}","starred_url":"https://api.github.com/users/muratg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratg/subscriptions","organizations_url":"https://api.github.com/users/muratg/orgs","repos_url":"https://api.github.com/users/muratg/repos","events_url":"https://api.github.com/users/muratg/events{/privacy}","received_events_url":"https://api.github.com/users/muratg/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":55,"state":"open","created_at":"2015-10-26T16:57:23Z","updated_at":"2016-01-22T22:53:53Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-12-22T14:44:50Z","updated_at":"2016-01-23T18:56:37Z","closed_at":null,"body":"When trying to post a large file  to an API action using form-data, the following exception is thrown. I have found this to be around 1.5mb but appears to be inconsistent. \r\n\r\nThis only seems to happen when hosting in an Azure Web App using the IISPlatformHandler. \r\n\r\nI am using ASP.NET 5 RC1 (1.0.0-rc1-final) packages.\r\n\r\nAction:\r\n\r\n        [HttpPost()]\r\n        public IActionResult PostText()\r\n        {\r\n            if (Request.Body.CanSeek)\r\n            {\r\n                Request.Body.Position = 0;\r\n            }\r\n\r\n            var body = new StreamReader(Request.Body).ReadToEnd();\r\n\r\n            ...\r\n        }\r\n\r\n > System.IO.InvalidDataException: Unexpected end of request content at Microsoft.AspNet.Server.Kestrel.Http.MessageBody.ForContentLength.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.WebUtilities.FileBufferingReadStream.d__27.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.WebUtilities.BufferedReadStream.d__39.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.WebUtilities.MultipartReaderStream.d__36.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.WebUtilities.StreamHelperExtensions.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.AspNet.Http.Features.Internal.FormFeature.d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.ModelBinding.FormValueProviderFactory.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__49.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__44.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Routing.InnerAttributeRoute.d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Routing.RouteCollection.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Builder.RouterMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ApplicationInsights.AspNet.RequestTrackingMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.IISPlatformHandler.IISPlatformHandlerMiddleware.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Hosting.Internal.RequestServicesContainerMiddleware.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Hosting.Internal.HostingEngine.<>c__DisplayClass32_0.d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Server.Kestrel.Http.Frame.d__79.MoveNext()"},"comment":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/comments/174212319","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/520#issuecomment-174212319","issue_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/520","id":174212319,"user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"created_at":"2016-01-23T18:56:37Z","updated_at":"2016-01-23T18:56:37Z","body":"Though the stack trace looks like a disconnected connection"}}