New Asp.Net MVC5 project produces an infinite loop to login page

后端 未结 21 3170
粉色の甜心
粉色の甜心 2020-11-29 20:12

I am creating a brand new projet with Visual Studio 2013, I choose Asp.Net MVC and the framework 4.5.1 The project is created, then, I do nothing else than F5 to start the d

21条回答
  •  离开以前
    2020-11-29 20:50

    I just dealt with this issue for hours on end.

    For me, it was in the Startup.Auth.cs file.

    This code, when commented out, stopped the redirect loop.

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/Account/Login")
            });
    

提交回复
热议问题