Skip to content

Use a ChainedConfigurationSource to share sources between WebApplicationBuilder and inner host #33082

Closed
@halter73

Description

@halter73

WebApplicationBuilder currently copies sources from its Configuration property in a _hostBuilder.ConfigureHostConfiguration( callback. This works well for sources that are configured by that point, but that means lower-level services like loggers that use the _hostBuilder's configuration don't observe sources that are added are removed after the ConfigureHostConfiguration runs.

As part of this, I think we should try to re-add app configuration during WebApplicationBuilder.Build() so we can allow users to change the environment after constructing the WebApplicationBuilder but before actually building it. See WebApplicationFunctionalTests.EnvironmentSpecificLoggingConfigurationSectionPassedToLoggerByDefault() for one of the broken scenarios.

Activity

changed the title [-]Use a ChainedConfigurationSource to share sources between WebApplicationBuilder an inner host[/-] [+]Use a ChainedConfigurationSource to share sources between WebApplicationBuilder and inner host[/+] on Jun 2, 2021
ghost

ghost commented on Jun 2, 2021

@ghost

Thanks for contacting us.

We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

self-assigned this
on Jul 8, 2021
modified the milestones: 6.0-preview7, 6.0-rc1 on Jul 12, 2021
ghost locked as resolved and limited conversation to collaborators on Aug 15, 2021
added
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
and removed on Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-hosting

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @halter73@BrennanConroy@amcasey

    Issue actions

      Use a ChainedConfigurationSource to share sources between WebApplicationBuilder and inner host · Issue #33082 · dotnet/aspnetcore