本文介绍了Session.Timeout被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我在我的global.asa文件中使用以下代码来设置 session.timeout值等等 - Sub Session_OnStart Session.Timeout = 40 Session(Authenticated)= 1 End Sub 然而,当我在这个 事件被触发后打印出session.timeout的值时,它返回20(我得到正确的价值 Session(& ;经过身份验证的)所以我的代码似乎正常工作了。 我检查了服务器上IIS(v5)中的默认超时值,但 这个读取900秒,在我的书中是15分钟。因为这个20的价值来自哪里,所以我非常感到困惑。 任何人都可以指出我正确的方向,因为我需要将其设置为 40分钟,我的WROX手册没有提供关于这个 财产的更多信息。 TIA, Colin 解决方案 Aaron Bertrand - MVP于2004年1月5日在 microsoft.public.inetserver.asp.general写道: Aaron, 很多人无法访问IIS设置, 愉快地使用虚拟服务器。 也许它可以在Application_onStart中设置? - Evertjan。 荷兰。 (请在我的电子邮件地址中将x'变为点数) 我明白这一点。我只是建议它,因为他说: 我检查了服务器上IIS(v5)中的默认超时值, 这让我相信他有权访问。 I''m using the following code in my global.asa file to set thesession.timeout value amongst other things -Sub Session_OnStartSession.Timeout = 40Session("Authenticated") = 1End SubYet when I print out the value of session.timeout on a page after thisevent has fired it returns 20 (I get the right value forSession("Authenticated") so my code appears to be working).I checked the default timeout value in IIS (v5) on the server, butthis reads 900 seconds, which in my books is 15 minutes. I amtherefore very confused as to where this value of 20 is coming from.Could anyone point me in the right direction as I need to set this to40 minutes and my WROX manual doesn''t provide much information on thisproperty.TIA,Colin 解决方案Aaron,lots of us have no access to IIS settings,happily using virtual servers.Perhaps it could be set in Application_onStart ?--Evertjan.The Netherlands.(Please change the x''es to dots in my emailaddress)I understand that. I only suggested it, because he said:"I checked the default timeout value in IIS (v5) on the server,"Which leads me to believe he DOES have access. 这篇关于Session.Timeout被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-01 21:50