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 +}