Short Walks: Using AppSettings.json in ASP.NET Core

One of the things that is very different when you move to ASP.NET Core is the way that configuration files are treated. This partly comes from the drive to move things that are not configuration out of configuration files. It looks like the days of app.config and web.config are numbered and, in their place, we have AppSettings.Json. Here’s an example of what that new file might look like:
{
“Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AzureAppSettings": {
"ApplicationInsightsKey": "1827374d-1d50-428d-92a1-c65fv2d73272"
}

}
The old files were very flat and, using the configuration manager, you could simply read a setting; something like this:

Link: https://dzone.com/articles/short-walks-using-appsettingsjson-in-aspnet-core?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev