From b06d0855f02b4c87b19f9ad062a9e00ee111d87c Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 30 Mar 2015 18:30:28 -0700 Subject: [PATCH] React to hosting --- src/MusicStore/Program.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/MusicStore/Program.cs b/src/MusicStore/Program.cs index c65c9de6d2..c12b018f68 100644 --- a/src/MusicStore/Program.cs +++ b/src/MusicStore/Program.cs @@ -17,14 +17,9 @@ namespace MusicStore var config = new Configuration(); config.AddCommandLine(args); - var context = new HostingContext() - { - Configuration = config, - ServerFactoryLocation = "Microsoft.AspNet.Server.WebListener", - ApplicationName = "MusicStore" - }; - - using (new HostingEngine().Start(context)) + using (WebHost.CreateEngine(config) + .UseServer("Microsoft.AspNet.Server.WebListener") + .Start()) { Console.WriteLine("Started the server.."); Console.WriteLine("Press any key to stop the server");