Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URLs/Ports cannot be specified using Configuration as documented #17009

Closed
bcrosnier opened this issue Feb 14, 2020 — with docs.microsoft.com · 1 comment
Closed

URLs/Ports cannot be specified using Configuration as documented #17009

bcrosnier opened this issue Feb 14, 2020 — with docs.microsoft.com · 1 comment
Labels
product-question Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

Copy link

bcrosnier commented Feb 14, 2020

In the Endpoint Configuration section, on how to configure Kestrel endpoints, the page mentions:
"Specify URLs using the: urls host configuration key."

This information is misleading and implies that the Configuration key urls works as intended, which is definitely not the case (aspnet/Hosting#1299)

Funnily enough, one supported way to setup endpoints from configuration, to my knowledge, is used in the appsettings.json example later on in the section (with the IConfiguration key being Kestrel:Endpoints:Http:Url for a HTTP endpoint), but:

  1. No explanation whatsoever is offered on how the Kestrel:Endpoints section works,
  2. The Endpoint property does not actually exist in KestrelServerOptions (I suppose there's a Configuration binder somewhere),
  3. Unlike other means of configuration like the ASPNETCORE_URLS env. var, the UseUrls() method, and the --urls program argument, the Kestrel:Endpoints:Http:Url key only supports a single endpoint, meaning I can't use http://127.0.0.1:12345;http://::1:12345 to listen on both IPv4 and IPv6, to the best of my knowledge.

I just wanted a Urls property somewhere in my IConfiguration. Have I been missing something?

Cheers!


Erratum 1

All three points are addressed in the Schema notes: section, and a valid configuration for the use case mentioned above looks something like this:

{
  "Kestrel": {
    "Endpoints": {
      "MyHttpV4": {
        "Url": "http://127.0.0.1:12345"
      },
      "MyHttpV6": {
        "Url": "http://[::1]:12345"
      }
    }
  }
}

I propose the urls host configuration key could be modified to explicit this behavior.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@dotnet-bot dotnet-bot added ⌚ Not Triaged Source - Docs.ms Docs Customer feedback via GitHub Issue labels Feb 14, 2020
@guardrex
Copy link
Collaborator

Hello @bcrosnier ...

I propose the urls host configuration key could be modified to explicit this behavior.

That's product feedback, and we only work on documentation on this repo. You can provide that feedback to the product unit on the engineering repo at https://github.com/dotnet/aspnetcore/issues.

There's in-design/in-progress work in this area, some of the issues are ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product-question Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

No branches or pull requests

3 participants