Skip to content

Kestrel limits are not loaded from appsettings.config #31108

Closed
@andriysavin

Description

@andriysavin

Description

At the beginning of the article there is a statement that

By default, Kestrel configuration is loaded from the Kestrel section using a preconfigured set of configuration providers.

and a sample is given

{
  "Kestrel": {
    "Limits": {
      "MaxConcurrentConnections": 100,
      "MaxConcurrentUpgradedConnections": 100
    },
    "DisableStringReuse": true
  }
}

However, neither of these settings seems to be loaded from the config, from my observation.
I also peeked at the KestrelConfigurationLoader and found no sign of these properties being loaded there.
I also found a sample where Kestrel options for some reason are loaded manually from the config during startup:

options
.Configure(context.Configuration.GetSection("Kestrel"), reloadOnChange: true)

So either the documentation page contains wrong information, or this is a bug in the code. Or I'm missing something :)

Page URL

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/options?view=aspnetcore-7.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/servers/kestrel/options.md

Document ID

5a5a34c5-1c75-ff17-b3d6-762194391319

Article author

tdykstra


Associated WorkItem - 203246

Metadata

Metadata

Assignees

Labels

Source - Docs.msDocs Customer feedback via GitHub Issuedoc-bugseQUESTeredIdentifies that an issue has been imported into Quest.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions