Skip to content
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

[samples/http-aspnetcore] changes to appsettings.json is not respected #17

Open
bacongobbler opened this issue Aug 21, 2024 · 0 comments

Comments

@bacongobbler
Copy link
Contributor

One thing I'm noticing as I'm messing about with the ASP.NET Core sample is that changes to appsettings.json is not being respected by the runtime. I assume this has something to do with how the .NET runtime loads appsettings.json from the filesystem.

As a workaround, I found using InMemoryConfiguration works. I'm assuming other configuration libraries (e.g. Azure App Configuration) that are dependent on outbound HTTP could potentially work as well.

builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
{
    ["Logging:LogLevel:Default"] = "Debug",
    ["Logging:LogLevel:Microsoft"] = "Warning",
    ["Logging:LogLevel:Microsoft.AspNetCore"] = "Information",
});
@bacongobbler bacongobbler changed the title [samples/http-aspnetcore]: changes to appsettings.json is not respected [samples/http-aspnetcore] changes to appsettings.json is not respected Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant