Skip to content

Changing configuration at runtime #389

Answered by Tratcher
vplauzon asked this question in General
Discussion options

You must be logged in to vote

The Microsoft.Extensions IConfiguration system used by AspNetCore to read appsettings.json allows for layering config from different sources including files and environment variables. It should just be a matter of figuring out the right environment variable name to match the appsetings.json structure for the destination entry you need to add/update.
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-3.1#environment-variables

The alternative is to use a full code based provider:
https://microsoft.github.io/reverse-proxy/articles/configproviders.html

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@vplauzon
Comment options

@Tratcher
Comment options

@vplauzon
Comment options

Answer selected by vplauzon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants