I am trying to use my OWIN. I created two MVC 5 projects. One with authentication using Aspnet.Identity, and the other as an empty project.
I added the following to the emptyp project:
public partial class Startup { public void ConfigureAuth(IAppBuilder app) { app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = "ApplicationCookie", LoginPath = new PathString("/Account/Login") }); } }
I decorated the "Home" action with the [Authorize] attribute in the "About" browser.
When I start the first project and go to the "About" screen, before entering it, it is redirected to the login action, as expected. When I do the same for the second project, I get "HTTP Error 401.0 - Unauthorized" instead of redirecting.
Any idea what might make the second behave this way?
source share