Azure: How to reload the Environment Variables without rebooting the App Service
Asked Answered
J

1

7

What I’m trying to achieve:
In an ASP.NET Core Web App, I want to listen for the configuration change event, and reload the new configuration value at run time. I'm changing the configuration setting by using the following CLI operation:

For Example:

az webapp config appsettings set --name $WebAppName --slot $SlotName --resource-group $ResourceGroupName --settings A_Setting_To_Monitor=$NewSettingValue

How can I detect this change event and load the new configuration value without resetting the App Service?

I'm using C# and .NET Core 2.1.

The Application Settings of Azure Web App Service

Jackal answered 28/4, 2019 at 1:53 Comment(0)
B
3

Have a look at Azure App Configuration.

Azure App Configuration provides a service to centrally manage application settings. Modern programs, especially programs running in a cloud, generally have many components that are distributed in nature. Spreading configuration settings across these components can lead to hard-to-troubleshoot errors during an application deployment. Use App Configuration to store all the settings for your application and secure their accesses in one place.

App Configuration makes it easier to implement the following scenarios:

  • Centralized management and distribution of hierarchical configuration data for different environments and geographies
  • Dynamic configuration changes without the need to redeploy or restart an application
  • Feature management
Bachelorism answered 28/4, 2019 at 7:53 Comment(1)
When changing environment variable values in a container, and using GetEnvironmentVariables.Get(name), they refresh. Is there a feature parity way to do this with isolated azure functions?Notate

© 2022 - 2024 — McMap. All rights reserved.