如何在页面上实现注销功能,以便将用户重定向到登录页面,并且不允许查看前一页?

 FormsAuthentication.SignOut(); is it enough for logout.

最佳答案

    /// <summary>
    /// Logs the user out of their forms authentication.
    /// </summary>
    public void SignOut()
    {
        FormsAuthentication.SignOut();
        FormsAuthentication.RedirectToLoginPage();
    }

关于c# - 登出功能,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16566745/

10-10 08:12