public Startup(IHostingEnvironment env) { // Setup configuration sources. var configuration = new Configuration() .AddJsonFile("config.json") .AddJsonFile($"config.{env.EnvironmentName}.json", optional: true); if (env.IsEnvironment("Development")) { // This reads the configuration keys from the secret store. // For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709 configuration.AddUserSecrets(); configuration.AddApplicationInsightsSettings(developerMode: true); } configuration.AddEnvironmentVariables("APPSETTING_"); Configuration = configuration; }
public Startup(IHostingEnvironment env) { // Setup configuration sources. var configuration = new Configuration() .AddJsonFile("config.json") .AddJsonFile($"config.{env.EnvironmentName}.json", optional: true); if (env.IsEnvironment("Development")) { // This reads the configuration keys from the secret store. // For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709 configuration.AddUserSecrets(); // This will expedite telemetry through pipeline, // allowing you to view results immediately configuration.AddApplicationInsightsSettings(developerMode: true); } configuration.AddEnvironmentVariables(); Configuration = configuration; }