Windows Authentication not working in ASP.NET MVC 5 web app -
I have an ASP.NET MVC 5 app and I am trying to enable Windows authentication. Development Machine Windows Server 2008 R2, IIS Express 8.0, Visual Studio 2013 & amp; .NET Framework 4.5
Whenever I browse the app I get a 404 error App http: // localhost: 63455 / account / login / return url =% 2f with one Redirect enters the loop. Eventually, My web Configured looks like this: I have tried to set the Anonymous authentication and Windows authentication setting on development server properties. I have the following How can I work with Windows authentication properly? The code is used with OWIN for form authentication . ReturnUrl is getting very big because it gets attached to each redirect.
& lt; System.web & gt; & Lt; Authentication mode = "Windows" /> & Lt; /system.web>
app settings :
& lt; Add Key = "AutoFormat" value = "False" /> & Lt; Add key = "enableSimpleMembership" value = "false" />
ConfigureAuth method in
Startup.Auth. Cs has the following code, which must be removed for Windows authentication .
// Enable the application to use a cookie Store information for the sign-in user app. Use Cookie Authentication (new cookie authorization option {authentication type = default authentication type. Application cookie, loginpath = new pathstring ("/ account / login")}); // Use a cookie to temporarily store information about a user login with 3rd party login provider app. UseExternalSignInCookie (DefaultAuthenticationTypes.ExternalCookie);
Comments
Post a Comment