Skip to content

Commit eb878db

Browse files
authored
Clarification on setting Kestrel options from config providers (#16889)
1 parent 4402308 commit eb878db

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

aspnetcore/fundamentals/servers/kestrel.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn about Kestrel, the cross-platform web server for ASP.NET Core
55
monikerRange: '>= aspnetcore-2.1'
66
ms.author: riande
77
ms.custom: mvc
8-
ms.date: 12/26/2019
8+
ms.date: 02/06/2020
99
uid: fundamentals/servers/kestrel
1010
---
1111
# Kestrel web server implementation in ASP.NET Core
@@ -111,7 +111,7 @@ The following examples use the <xref:Microsoft.AspNetCore.Server.Kestrel.Core> n
111111
using Microsoft.AspNetCore.Server.Kestrel.Core;
112112
```
113113

114-
Kestrel options, which are configured in C# code in the following examples, can also be set using a [configuration provider](xref:fundamentals/configuration/index). For example, the File Configuration Provider can load Kestrel configuration from an *appsettings.json* or *appsettings.{Environment}.json* file:
114+
In examples shown later in this article, Kestrel options are configured in C# code. Kestrel options can also be set using a [configuration provider](xref:fundamentals/configuration/index). For example, the [File Configuration Provider](xref:fundamentals/configuration/index#file-configuration-provider) can load Kestrel configuration from an *appsettings.json* or *appsettings.{Environment}.json* file:
115115

116116
```json
117117
{
@@ -125,6 +125,9 @@ Kestrel options, which are configured in C# code in the following examples, can
125125
}
126126
```
127127

128+
> [!NOTE]
129+
> <xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> and [endpoint configuration](#endpoint-configuration) are configurable from configuration providers. Remaining Kestrel configuration must be configured in C# code.
130+
128131
Use **one** of the following approaches:
129132

130133
* Configure Kestrel in `Startup.ConfigureServices`:
@@ -484,15 +487,13 @@ In the following *appsettings.json* example:
484487
"Http": {
485488
"Url": "http://localhost:5000"
486489
},
487-
488490
"HttpsInlineCertFile": {
489491
"Url": "https://localhost:5001",
490492
"Certificate": {
491493
"Path": "<path to .pfx file>",
492494
"Password": "<certificate password>"
493495
}
494496
},
495-
496497
"HttpsInlineCertStore": {
497498
"Url": "https://localhost:5002",
498499
"Certificate": {
@@ -502,11 +503,9 @@ In the following *appsettings.json* example:
502503
"AllowInvalid": "<true or false; defaults to false>"
503504
}
504505
},
505-
506506
"HttpsDefaultCert": {
507507
"Url": "https://localhost:5003"
508508
},
509-
510509
"Https": {
511510
"Url": "https://*:5004",
512511
"Certificate": {

0 commit comments

Comments
 (0)