use WebHost.CreateDefaultBuilder in IdentitySample.Mvc

so that it picks up the logging config from the `appsettings.json`
This commit is contained in:
Tugberk Ugurlu 2017-09-09 22:00:49 +01:00 committed by Hao Kung
parent e85a935d45
commit 20ec50d5d2
1 changed files with 6 additions and 11 deletions

View File

@ -1,20 +1,15 @@
using System.IO; using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
namespace IdentitySample namespace IdentitySample
{ {
public static class Program public static class Program
{ {
public static void Main(string[] args) public static void Main(string[] args) => BuildWebHost(args).Run();
{
var host = new WebHostBuilder() public static IWebHost BuildWebHost(string[] args) =>
.UseKestrel() WebHost.CreateDefaultBuilder(args)
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>() .UseStartup<Startup>()
.Build(); .Build();
host.Run();
}
} }
} }