From 1b790467a1663d257c4b393de257ceea48fa8a43 Mon Sep 17 00:00:00 2001 From: Chris R Date: Tue, 8 Sep 2015 09:50:47 -0700 Subject: [PATCH] #269 Use a json file instead of an ini file to configure hosting. --- src/Microsoft.AspNet.Hosting/Program.cs | 6 +++--- src/Microsoft.AspNet.Hosting/project.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNet.Hosting/Program.cs b/src/Microsoft.AspNet.Hosting/Program.cs index 985feeda..3a8a941c 100644 --- a/src/Microsoft.AspNet.Hosting/Program.cs +++ b/src/Microsoft.AspNet.Hosting/Program.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Hosting { public class Program { - private const string HostingIniFile = "Microsoft.AspNet.Hosting.ini"; + private const string HostingJsonFile = "Microsoft.AspNet.Hosting.json"; private const string ConfigFileKey = "config"; private readonly IServiceProvider _serviceProvider; @@ -25,11 +25,11 @@ public void Main(string[] args) // Allow the location of the ini file to be specified via a --config command line arg var tempBuilder = new ConfigurationBuilder().AddCommandLine(args); var tempConfig = tempBuilder.Build(); - var configFilePath = tempConfig[ConfigFileKey] ?? HostingIniFile; + var configFilePath = tempConfig[ConfigFileKey] ?? HostingJsonFile; var appBasePath = _serviceProvider.GetRequiredService().ApplicationBasePath; var builder = new ConfigurationBuilder(appBasePath); - builder.AddIniFile(configFilePath, optional: true); + builder.AddJsonFile(configFilePath, optional: true); builder.AddEnvironmentVariables(); builder.AddCommandLine(args); var config = builder.Build(); diff --git a/src/Microsoft.AspNet.Hosting/project.json b/src/Microsoft.AspNet.Hosting/project.json index fe3ed63b..ad736ead 100644 --- a/src/Microsoft.AspNet.Hosting/project.json +++ b/src/Microsoft.AspNet.Hosting/project.json @@ -15,7 +15,7 @@ "Microsoft.Framework.Configuration": "1.0.0-*", "Microsoft.Framework.Configuration.CommandLine": "1.0.0-*", "Microsoft.Framework.Configuration.EnvironmentVariables": "1.0.0-*", - "Microsoft.Framework.Configuration.Ini": "1.0.0-*", + "Microsoft.Framework.Configuration.Json": "1.0.0-*", "Microsoft.Framework.DependencyInjection": "1.0.0-*", "Microsoft.Framework.Logging": "1.0.0-*", "Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*",