-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
host and app config, appsettings Urls takes precedence over ASPNETCORE /2 #25686
Conversation
@serpent5 > Application config falls back to host config, What does falls back mean? Host config first, then app config? Just getting started. Please review the issue, I'll have question for you Thursday morning. |
I think it ultimately means a value will be read from host config if it doesn't exist in app config. App config overrides host config. |
@halter73 please review |
|
||
<a name="default"></a> | ||
|
||
## Default configuration | ||
## Default application configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the structure should be as follows.
## Application and Host Configuration
// summary describing config fallback behavior between config providers
// and the fallback behavior between application config and host config
### Default application configuration sources
### Default host configuration sources
### Host bootstrap settings
I also think that the section discussing default application config should be reordered to go from highest to lowest priority along with the same list for default host configuration sources. As ordered right now, the highest priority source for application config (Command-line arguments) is in the middle of the combined list of application and host sources which makes no sense. Application config falls back to host config, so I want to be able to skim down the list of sources without the order resetting in the middle.
The following should be deleted:
- ChainedConfigurationProvider : Adds an existing
IConfiguration
as a source. In the default configuration case, adds the host configuration and setting it as the first source for the app configuration.
It's super confusing. Hardly anyone should care about the mechanism that application config falls back to hosting config (which isn't entirely accurate anymore anyway for WebApplicationBuilder
). I think it similar to the user secrets
where the actual configuration provider used to make this fallback work (if any) is unimportant.
The last (lowest-priority) element of the list of default application sources should just read:
- A fallback to the host configuration described in the next section
There should be nothing in between the list of default application sources and default host sources other than the section heading. This should make the full list of default config sources in priority order more easily scannable.
Can we also update [App secrets](xref:security/app-secrets)
to [user-secrets](xref:security/app-secrets)
and Environment variables
to Non-prefixed environment variables
similar to in my comment?
Co-authored-by: Stephen Halter <[email protected]> Co-authored-by: Ignas Maslinskas <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good. @Tratcher said he might also take a look.
Co-authored-by: Stephen Halter <[email protected]>
Co-authored-by: Stephen Halter <[email protected]>
Fixes #25626
Internal review URL
@Hoffs @chertby please review.