From 2255f3f7ad66f1d51f91325e1e7f02d7fe80a48f Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 2 Sep 2015 08:28:36 -0700 Subject: [PATCH] React to IApplicationBuilder.Server change. --- src/MusicStore/StartupNtlmAuthentication.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MusicStore/StartupNtlmAuthentication.cs b/src/MusicStore/StartupNtlmAuthentication.cs index 8c800acbe9..15544560aa 100644 --- a/src/MusicStore/StartupNtlmAuthentication.cs +++ b/src/MusicStore/StartupNtlmAuthentication.cs @@ -4,7 +4,7 @@ using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Diagnostics; using Microsoft.AspNet.Diagnostics.Entity; -using Microsoft.AspNet.Server.WebListener; +using Microsoft.AspNet.Http.Features; using Microsoft.Data.Entity; using Microsoft.Framework.Caching.Memory; using Microsoft.Framework.Configuration; @@ -94,10 +94,10 @@ namespace MusicStore // Set up NTLM authentication for WebListener like below. // For IIS and IISExpress: Use inetmgr to setup NTLM authentication on the application vDir or modify the applicationHost.config to enable NTLM. - if ((app.Server as ServerInformation) != null) + var listener = app.ServerFeatures.Get(); + if (listener != null) { - var serverInformation = (ServerInformation)app.Server; - serverInformation.Listener.AuthenticationManager.AuthenticationSchemes = AuthenticationSchemes.NTLM; + listener.AuthenticationManager.AuthenticationSchemes = AuthenticationSchemes.NTLM; } app.UseDatabaseErrorPage(DatabaseErrorPageOptions.ShowAll);