无需"会话超时", [英] No required "Session Timeout",

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

问题描述

在我的项目会议是唯一可用的30分钟(这是默认设置)。

In my project session was only available for 30 minutes (Which is by default).

但...我想禁用这种会话超时。意味着我需要无限的时间会由我的网站永远不会再拿到登录过程。

BUT... I want to disable this kind of session timeout. Means I required unlimited time for session by which my website never get log-in process again.

推荐答案

如果用户preSS的 X按钮的对他的浏览器其会话(和所有它的对象)将永远保存在服务器内存!

NEVER do this!

If user press X button on his browser his session (and all it's objects) will always be kept in server memory!

解决的办法是 保持ASP.NET会话活着使用这个简单的JavaScript破解,赚不到极长会议。

The solution is keeping ASP.NET Session alive using this simple javascript hack, not making extremely long sessions.

Javascript的强制页面后空数据到服务器,它是一种平。
服务器不发布任何东西,但会话超时自动重置了。
您可以在19分钟的20分钟配置会话时间,并平定时器。

Javascript forces the page to post empty data to the server, it's a kind of ping.
Server doesn't post anything back but the session timeout is automatically resetted.
You can configure session time on 20 mins, and ping timer on 19 mins.

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

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