Need the ability to suppress the environment variable config source #20328
Labels
area-hosting
Includes Hosting
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
Needs: Design
This issue requires design work before implementating.
Milestone
#20308
Describe the bug
Blazor's debug proxy runs as a separate process launched from the web app. When running behind IIS out-of-proc it inherits all of the environment variables from IIS/ANCM which causes it to think it is the one responsible for handling requests proxied from IIS. It also ends up with the wrong content root and other such config. Removing ConfigureWebHostDefaults or UseIISIntegration doesn't help because IIS sets the HOSTINGSTARTUPASSEMBLIES environment variable to inject itself (maybe that was a bad idea...).
The debug proxy app needs full control over its configuration and thus needs a way to suppress any config coming from environment variables. That's not possible today because the env var config provider is added by default.
aspnetcore/src/Hosting/Hosting/src/GenericHost/GenericWebHostBuilder.cs
Lines 34 to 40 in f990751
Proposal
Add a way that allows the caller of ConfiureWebHost and/or ConfigureWebHostDefaults to opt out of the environment variable config source.
The text was updated successfully, but these errors were encountered: