Remove references to UseDefaultHostingConfiguration

This commit is contained in:
BrennanConroy 2016-04-28 09:41:08 -07:00
parent d4fbbd02d0
commit a0f236759d
4 changed files with 16 additions and 2 deletions

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Net.Http.Server;
namespace ServerComparison.TestSites.Standalone
@ -10,8 +11,13 @@ namespace ServerComparison.TestSites.Standalone
{
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();
var builder = new WebHostBuilder()
.UseDefaultHostingConfiguration(args)
.UseConfiguration(config)
.UseIISIntegration()
.UseStartup("ServerComparison.TestSites.Standalone");

View File

@ -5,6 +5,7 @@
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNetCore.Server.WebListener": "0.1.0-*",
"Microsoft.AspNetCore.WebUtilities": "1.0.0-*",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
"Microsoft.Net.Http.Headers": "1.0.0-*"

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Net.Http.Server;
namespace ServerComparison.TestSites
@ -10,8 +11,13 @@ namespace ServerComparison.TestSites
{
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();
var builder = new WebHostBuilder()
.UseDefaultHostingConfiguration(args)
.UseConfiguration(config)
.UseIISIntegration()
.UseStartup("ServerComparison.TestSites");

View File

@ -5,6 +5,7 @@
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNetCore.Server.WebListener": "0.1.0-*",
"Microsoft.AspNetCore.WebUtilities": "1.0.0-*",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
"Microsoft.Net.Http.Headers": "1.0.0-*"