asp.net mvc是IsAuthenticated属性

kus*_*agi 1 authentication asp.net-mvc attributes

是这样的标记方法的任何解决方案

[IsAuthenticated(true)]
        public ActionResult Profile()
        {

            return View();
        }
Run Code Online (Sandbox Code Playgroud)

不打电话if (request.IsAuthenticated)

Dar*_*rov 9

AuthorizeAttribute:

[Authorize]
public ActionResult Profile()
{
    return View();
}
Run Code Online (Sandbox Code Playgroud)