会话超时查询 [英] Session Timeout Query

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

问题描述

Hello Friends,

如果用户刷新页面或重定向到网站中的其他页面,3分钟后如何使会话超时无论如何。我不想在页面刷新时重新启动会话超时。总之,SESSION必须在3分钟后超时..



任何人都可以帮忙..









谢谢

Hello Friends,
How to make session timeout anyhow after 3 min ,even when user is refresh Page or redirecting to other page in website. I don't want to restart the session timeout on page refresh. In short SESSION must be timeout after 3 min..

Can anyone help..




Thank You

推荐答案

我认为没有总会话超时计数器 - 正常会话由回发自动更新,因此更改对您没有多大帮助。

您可以实现类似的功能。

将会话超时设置为三分钟。

当会话启动时,使用当前时间加上一个变量加上三分钟。

每次收到回发或页面加载,检查会话中的超时并查看它是否已过期。如果您使用.NET,可能希望将其作为母版页的一部分。
I don't think there is a "total session timeout" counter - the normal session is automatically renewed by a postback, so changing that doesn't help you much.
You can implement something like it though.
Set the Session timeout to three minutes.
When the Session starts, add a variable to the session with the current time, plus three minutes.
Each time you get a postback or a page load, check the timeout in the Session and see if it has expired. Probably, you want to do this as part of your Master Page, if you are using .NET.


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

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