旧版(经典)ASP代码会话问题 [英] legacy (classic) ASP code session issue

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

问题描述

我的问题是关于经典ASP,而不是ASP.Net.我在这里问专家,因为搜索引擎总是告诉我ASP.Net的答案.我的困惑是,

My question is about classic ASP, not ASP.Net. I ask expert here since search engine always tell me ASP.Net answers. My confusions are,

  1. 如何在经典的ASP代码中或通过配置设置会话过期时间?
  2. 如何延长会话过期时间?有会话过期事件吗?
  3. 如何知道会话何时到期?

先谢谢了, 乔治

推荐答案

请阅读以下内容,我认为它可以回答您的所有问题:

Please read this, I think it answers all your questions:

http://www.w3schools.com/ASP/asp_sessions.asp

乔治,

在服务器端有一个session_end事件,但是我想您想要在客户端检测到它.

There is a session_end event on the server side, but I suppose what you want is to detect it on client side.

为此,您必须在javascript上设置一个计时器,例如在会话超时前一分钟结束并弹出警报.警报使用户可以选择扩展会话.如果用户说是",那么您将张贴以下表格(或ajax调用或在服务器端生成请求并扩展会话的任何内容).

To do that, you must set a timer on javascript, to end for example one minute before the session timeout and popup an alert. The alert gives the user the choice to extend the session. If the user says yes, then you make a post of the form (or an ajax call or anything that generates a request on the server side and so extends the session).

这篇关于旧版(经典)ASP代码会话问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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