首页 > Web开发 > 详细

设置超时前的ASP会话到期(ASP session expiration before timeout setting)

时间:2021-01-09 23:25:56      阅读:33      评论:0      收藏:0      [点我收藏+]

Some of my legacy program is using ASP (not ASP.Net), and even if I set long session expire time, for example to 20 minutes, sometimes in short time (e.g. in several minutes) I will still notice session expire error box –

"too much idle time, please login again."

Any ideas to analyze further? Not sure whether it is my code bug or server (browser) configuration issue, since not all client/server combinations are met with this strange issue.

The session expire box is triggered by my code:

<%
    if session("timeToken") = "" then
%>

<script language = "JavaScript">
<!--
window.alert ("too much idle time, please login again");
//-->
</script>
<%
response.End()
end if
%>

基于您的更新的一些想法:




    1. 还有其他原因导致您的 session(" timeToken")为空?


    1. session(" timeToken")<的实际值如何? / code>更改您的代码?会话开始时是否已设置?是否定期更新?它存储什么值?




您编写的代码似乎不错,因此如果不是代码问题,这可能是一个真正的会话问题...只是一些需要首先检查的事情。



更新:




    • ASP会话状态通常使用cookie维护-您可以检查客户端是否启用cookie吗?

    • ASP应用程序是否已投放一台以上的服务器?如果是从Web场或群集中进行服务,则需要确保会话状态可以在计算机上持久存在,或者用户的会话处于"粘性"状态-也就是说,它始终由同一台服务器提供服务。

设置超时前的ASP会话到期(ASP session expiration before timeout setting)

原文:https://www.cnblogs.com/huadian/p/14256888.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!