gpt4 book ai didi

Azure:如何在不重新启动应用程序服务的情况下重新加载环境变量

转载 作者:行者123 更新时间:2023-12-04 13:01:29 26 4
gpt4 key购买 nike

我想要实现的目标:
在 ASP.NET Core Web 应用程序中,我想监听配置更改事件,并在运行时重新加载新的配置值。我正在使用以下 CLI 操作更改配置设置:

例如:

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

如何在不重置应用服务的情况下检测此更改事件并加载新的配置值?

我使用的是 C# 和 .NET Core 2.1。

The Application Settings of Azure Web App Service

最佳答案

看看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

关于Azure:如何在不重新启动应用程序服务的情况下重新加载环境变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55886377/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com