会话超时问题 [英] Session time out issue

查看:60
本文介绍了会话超时问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经在我的web.config中设置了InProc会话时间。

重定向到注销页面1分钟后。在注销页面中我想捕获该用户的注销时间,这是我没有得到的,因为1分钟后所有会话值都变为NULL。



< sessionstate mode = InProctimeout =1>



如果通过web.config发生超时,请帮助我获取用户值



我尝试了什么:



尝试从谷歌但没有得到任何答案

Hi All,
I have set InProc session time out in my web.config .
after 1 minute its redirect to logout page . in logout page i want to capture the logout time of that User , which i am not getting because after 1 minute all session values get NULL.

<sessionstate mode="InProc" timeout="1">

Please help me how i will get that User value if timeout happen through web.config

What I have tried:

tried from google but not getting any answer

推荐答案

if(Session.IsNewSession){
initSession();
}










private void initSession()
{
    Session.Clear();
    Session.Abandon();
    Response.Redirect("LoginPage.aspx");
}





试试这个



try this


这篇关于会话超时问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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