I have an ASP.NET MVC 5 app and am trying to enable Windows Authentication. The development machine is Windows Server 2008 R2, IIS Express 8.0, Visual Studio 2013 & .NET Fra
The ConfigureAuth
method in Startup.Auth.cs
contained the following code which needed to be removed for Windows Authentication.
The code is used for Forms Authentication with OWIN.
// Enable the application to use a cookie to store information for the signed in user
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
// Use a cookie to temporarily store information about a user logging in with a third party login provider
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);