You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
No explanation whatsoever is offered on how the Kestrel:Endpoints section works,
The Endpoint property does not actually exist in KestrelServerOptions (I suppose there's a Configuration binder somewhere),
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:
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 theIConfiguration
key beingKestrel:Endpoints:Http:Url
for a HTTP endpoint), but:No explanation whatsoever is offered on how theKestrel:Endpoints
section works,TheEndpoint
property does not actually exist inKestrelServerOptions
(I suppose there's a Configuration binder somewhere),Unlike other means of configuration like theASPNETCORE_URLS
env. var, theUseUrls()
method, and the--urls
program argument, theKestrel:Endpoints:Http:Url
key only supports a single endpoint, meaning I can't usehttp://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 myIConfiguration
. 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: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.
The text was updated successfully, but these errors were encountered: