From 20ec50d5d26f2052afcfcf640c69c6049208e799 Mon Sep 17 00:00:00 2001 From: Tugberk Ugurlu Date: Sat, 9 Sep 2017 22:00:49 +0100 Subject: [PATCH] use WebHost.CreateDefaultBuilder in IdentitySample.Mvc so that it picks up the logging config from the `appsettings.json` --- samples/IdentitySample.Mvc/Program.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/samples/IdentitySample.Mvc/Program.cs b/samples/IdentitySample.Mvc/Program.cs index 03110954a3..a49f6eaad4 100644 --- a/samples/IdentitySample.Mvc/Program.cs +++ b/samples/IdentitySample.Mvc/Program.cs @@ -1,20 +1,15 @@ -using System.IO; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; namespace IdentitySample { public static class Program { - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() + public static void Main(string[] args) => BuildWebHost(args).Run(); + + public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) .UseStartup() .Build(); - - host.Run(); - } } -} \ No newline at end of file +}