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

后端 未结 21 3391
粉色の甜心
粉色の甜心 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:56

    I solved the same problem thanks to this accepted answer: ASP.NET Login Redirect Loop when user not in role.

    It is possible that the controller containing Login action is decorated with an AuthorizeAttribute (even a custom one) while the login action is not decorated with AllowAnonymous attribute. Removing AuthorizeAttribute from the controller and adding AllowAnonymous to login action may be a possible solution.

提交回复
热议问题