Azure App Configuration : practical guide
Create a non https mvc dotnet core project.
dotnet new mvc --no-https
Sample csproj configuration. Dotnet core will throw you missing Configuration Error, if you include some packages that are not suppose to be in.If you're doing it from nuget package manager, please ensure you checked "Include Pre-release"
dotnet add package Microsoft.Azure.AppConfiguration.AspNetCore --version
3.0.0-preview-010560002-1165
You need to create a ConnectionString:Appconfig in your app settings. In actual deployment it looks like this
The value should be something like this (just copy connection string value) :-
Endpoint=https://your-awesome-appconfig.azconfig.io;Id=fake_id;Secret=fakesecret
Let's wire up your view to actually pull data from Application Configuration
You need to grab some configuration data from the store and show it like this
Our application configuration's Configuration Explorer contains the following data :-
Restore, Build and Run
dotnet restore
dotnet build
Some notes
Key is case insensitive. If your key is "key" vs "KEY", it doesn't make any difference
.
You need to restart your web app service if you're updated the value, as it is largely cached. Refresh wont help :)
Value are encrypted over https.
Deployment.
And ready to deployed straight to web app service. Just make sure you didn't forget about configuration settings described earlier.
Comments