diff --git a/src/MusicStore/Startup.cs b/src/MusicStore/Startup.cs index eb1b4b53ca..95d08c2c72 100644 --- a/src/MusicStore/Startup.cs +++ b/src/MusicStore/Startup.cs @@ -7,10 +7,6 @@ using Microsoft.Data.Entity; using Microsoft.Framework.ConfigurationModel; using Microsoft.Framework.DependencyInjection; using MusicStore.Models; -using Microsoft.AspNet.Security.Facebook; -using Microsoft.AspNet.Security.Google; -using Microsoft.AspNet.Security.Twitter; -using Microsoft.AspNet.Security.MicrosoftAccount; using Microsoft.Framework.Cache.Memory; namespace MusicStore @@ -108,7 +104,7 @@ namespace MusicStore app.UseErrorPage(ErrorPageOptions.ShowAll); // Add services from ConfigureServices - app.UseServices(); + app.UsePerRequestServices(); //Configure SignalR app.UseSignalR(); diff --git a/src/MusicStore/StartupNtlmAuthentication.cs b/src/MusicStore/StartupNtlmAuthentication.cs index 9c8820daf9..28936d7355 100644 --- a/src/MusicStore/StartupNtlmAuthentication.cs +++ b/src/MusicStore/StartupNtlmAuthentication.cs @@ -66,7 +66,7 @@ namespace MusicStore //Note: ErrorPageOptions.ShowAll to be used only at development time. Not recommended for production. app.UseErrorPage(ErrorPageOptions.ShowAll); - app.UseServices(services => + app.UsePerRequestServices(services => { // Add EF services to the services container services.AddEntityFramework()