I have a ASP.Net 5 application where i have some configuration values stored in config.json file. my config.json file is something like this.
{
"AppSettings": {
"SiteEmailAddress": "[email protected]",
"APIKey": "some_api_key"
}
}
I am setting up the config.json file to use in Startup.cs file like this.
public static IConfigurationRoot Configuration;
public Startup(IApplicationEnvironment appEnv) {
var builder = new ConfigurationBuilder(appEnv.ApplicationBasePath)
.AddJsonFile("config.json")
.AddEnvironmentVariables();
Configuration = builder.Build();
}
And accessing the config settings like this..
var email = Startup.Configuration["AppSettings:SiteEmailAddress"];
Earlier in ASP.Net we can use the Web.Config file to store these Application Settings and override them in App Settings in Azure App Settings section and that works with out any issues. But how can i do the same thing in ASP.Net 5 app.
How can i override the configuration values in config.json file in the App Settings section in Azure.