'Can we update the configurations from the advance section of the Azure portal programmatically?
I am trying to call an API multiple times with the change in the configuration files. Can we do the changes in the configuration files at runtime in the code before calling the API. We cannot make the code changes in the API we are trying to call.
Solution 1:[1]
Can we update the configurations from the advance section of the Azure portal programmatically?
- In the Azure portal => In App Services, select your app => In the app's left menu, select Configuration => Application settings
- To add a new app setting, click New application setting,to edit a setting, click the Edit button on the right side.
- You can stick the setting to the current slot.
We can configure/Edit Application and connection strings
We can also update the Application setting using REST API
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings?api-version=2021-02-01
Can we do the changes in the configuration files at runtime in the code
Refer Use dynamic configuration in an ASP.NET Core app
Please refer Configure an App Service app and SO Thread for more information
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | HarshithaVeeramalla-MT |