From 97d9b2e385e8c99699b11c69a138b541c6547109 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Thu, 26 Feb 2015 12:19:11 -0800 Subject: [PATCH] Reacting to hosting changes --- src/MusicStore/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/MusicStore/Program.cs b/src/MusicStore/Program.cs index 23812e98e1..7bc0f254a7 100644 --- a/src/MusicStore/Program.cs +++ b/src/MusicStore/Program.cs @@ -28,12 +28,13 @@ namespace MusicStore var serviceCollection = HostingServices.Create(_hostServiceProvider); var services = serviceCollection.BuildServiceProvider(); + var applicationLifetime = services.GetRequiredService(); var context = new HostingContext() { - Services = services, + ApplicationLifetime = applicationLifetime, Configuration = config, - ServerName = "Microsoft.AspNet.Server.WebListener", + ServerFactoryLocation = "Microsoft.AspNet.Server.WebListener", ApplicationName = "MusicStore" };