From d2715eb7cfd97c83b46d8d720d100091b24ccac5 Mon Sep 17 00:00:00 2001 From: Brennan Date: Tue, 3 Sep 2019 13:12:52 -0700 Subject: [PATCH] Update 3.0.0-preview-known-issues.md --- .../3.0/preview/3.0.0-preview-known-issues.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/release-notes/3.0/preview/3.0.0-preview-known-issues.md b/release-notes/3.0/preview/3.0.0-preview-known-issues.md index 2308305b..1b934a40 100644 --- a/release-notes/3.0/preview/3.0.0-preview-known-issues.md +++ b/release-notes/3.0/preview/3.0.0-preview-known-issues.md @@ -39,15 +39,17 @@ To update the path for every new terminal session, the `export` entry will need WebSocket connections to IIS In-Process servers will close after the client sends ~30MB of data. - To workaround this issue you can host your app with the [OutOfProcess](https://docs.microsoft.com/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.0#out-of-process-hosting-model) hosting model. Or you can change the `MaxRequestBodySize` limit in your app during configuration: + To workaround this issue you can host your app with the [OutOfProcess](https://docs.microsoft.com/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.0#out-of-process-hosting-model) hosting model. Or you can change the `MaxRequestBodySize` limit in your app when handling WebSocket requests by adding the following to your middleware pipeline: ```csharp - var builder = new WebHostBuilder() - .UseIIS() - .ConfigureServices(services => + app.Use(next => context => + { + if (context.WebSockets.IsWebSocketRequest) { - services.Configure(options => options.MaxRequestBodySize = long.MaxValue); - }); + context.Features.Get()?.MaxRequestBodySize = null; + } + return next(context); + }); ``` ### Preview 8