Skip to content

Commit

Permalink
ConfigureKestrel updates (dotnet#8384)
Browse files Browse the repository at this point in the history
  • Loading branch information
guardrex authored Sep 7, 2018
1 parent 9955cd8 commit 2ddfa7c
Show file tree
Hide file tree
Showing 2 changed files with 253 additions and 22 deletions.
25 changes: 24 additions & 1 deletion aspnetcore/fundamentals/host/web-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: guardrex
description: Learn about the web host in ASP.NET Core, which is responsible for app startup and lifetime management.
ms.author: riande
ms.custom: mvc
ms.date: 06/19/2018
ms.date: 09/01/2018
uid: fundamentals/host/web-host
---
# ASP.NET Core Web Host
Expand Down Expand Up @@ -74,6 +74,25 @@ The configuration defined by `CreateDefaultBuilder` can be overridden and augmen
...
```

::: moniker-end

::: moniker range=">= aspnetcore-2.2"

* The following call to `ConfigureKestrel` overrides the default [Limits.MaxRequestBodySize](/dotnet/api/microsoft.aspnetcore.server.kestrel.core.kestrelserverlimits.maxrequestbodysize) of 30,000,000 bytes established when Kestrel was configured by `CreateDefaultBuilder`:

```csharp
WebHost.CreateDefaultBuilder(args)
.ConfigureKestrel((context, options) =>
{
options.Limits.MaxRequestBodySize = 20000000;
});
...
```

::: moniker-end

::: moniker range="= aspnetcore-2.0 || aspnetcore-2.1"

* The following call to [UseKestrel](/dotnet/api/microsoft.aspnetcore.hosting.webhostbuilderkestrelextensions.usekestrel) overrides the default [Limits.MaxRequestBodySize](/dotnet/api/microsoft.aspnetcore.server.kestrel.core.kestrelserverlimits.maxrequestbodysize) of 30,000,000 bytes established when Kestrel was configured by `CreateDefaultBuilder`:

```csharp
Expand All @@ -85,6 +104,10 @@ The configuration defined by `CreateDefaultBuilder` can be overridden and augmen
...
```

::: moniker-end

::: moniker range=">= aspnetcore-2.0"

The *content root* determines where the host searches for content files, such as MVC view files. When the app is started from the project's root folder, the project's root folder is used as the content root. This is the default used in [Visual Studio](https://www.visualstudio.com/) and the [dotnet new templates](/dotnet/core/tools/dotnet-new).

For more information on app configuration, see <xref:fundamentals/configuration/index>.
Expand Down
Loading

0 comments on commit 2ddfa7c

Please sign in to comment.