I have an Azure app service. And I have C# application. I want to get and set configuration settings (appsettings) for my Azure app service from my C# application.
I can do it from PowerShell using az webapp config appsettings list
and az webapp config appsettings set
. I want to achieve the same from C#.
My current solution is to launch PowerShell from C# (using new Process()
) and use az webapp
. That is ugly, errors are hard to catch, and it is awkward to get to run on both Windows and Linux.
I have looked at the NuGet package Microsoft.Azure.Management.Fluent. It has a method IWebAppBase.GetSettings which lets me read the settings. But I can find no way to change the settings. The NuGet package says that it is being phased out, but I cannot find a replacement package for managing app services.
Is there a nice NuGet I should use?