如何杀死用户的会话时,他在ASP.NET LoggedOut [英] How to kill the Session of User when he LoggedOut in ASP.NET

查看:109
本文介绍了如何杀死用户的会话时,他在ASP.NET LoggedOut的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有BUIL,通过asp.net的登录控件创建asp.net和的login.aspx页的验证一个asp.net web应用程序的登录页面。现在我有一个问题,在注销。

I have a asp.net web application login page which has buil-in Authentication of asp.net and login.aspx page created by Login control of asp.net. Now i have a problem in logout.

在pssed注销用户$ P $链接重定向到的Login.aspx的页面。但是,当用户preSS返回从浏览器按钮,用户登录页面,而我想避免,它必须要求输入登录凭据的应用程序。

When user pressed "Logout" the link is redirected to "Login.aspx" page. But, when the user press "Back" button from the browser the user "Login"to the page to the application which i want to avoid and it must ask to enter Login Credentials.

帮助鸭preciated ..!
谢谢Advace ..!

Help Appreciated..! Thanks in Advace..!

推荐答案

您可以尝试

   protected void btnLogout_Click(object sender, EventArgs e)
    {
        Session.RemoveAll();
        Session.Abandon();

        Response.Redirect("LoginPage.aspx");
    }

这篇关于如何杀死用户的会话时,他在ASP.NET LoggedOut的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆