标签: asp.net-mvc-3 form-authentication
我正在使用MVC3进行表单身份验证。除了一件事,一切都很好。我想在他/她再次尝试访问LogOn页面时将经过身份验证的用户重定向到另一个页面。那我怎么能实现这个呢?
答案 0 :(得分:7)
在LogOn Action中执行类似的操作。
if (HttpContext.Request.IsAuthenticated) { return RedirectToAction("Action", "Controller"); } return View();