System.Web.Security驗證
FormsAuthentication.RedirectFromLoginPage(username, true)登出
FormsAuthentication.SignOut()查證是否驗證
User.Identity.IsAuthenticatedASP.NET MVC (在 Controller 的 Action 前加 Authorize 屬性)
[Authorize]e.g.
[Authorize]
public ActionResult Index() { return View(); }相關資料:
沒有留言:
張貼留言