如何避免会话超时并清除所有值 [英] how to avoid Session Timeout and clear all values
本文介绍了如何避免会话超时并清除所有值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的朋友
我在用户登录时遇到与会话对象相关的问题,然后将 id 存储到会话变量但是在一段时间之后id被清除了i 在web.config 中设置会话超时30但是它不起作用,我不知道有什么问题...
帮帮我
我的代码..
Dear friends
I am having Problem related with the Session Object when the user login then i store its id in to session variable but after some time that id get cleared i set session timeout 30 in web.config but it is not working, I dont know what is wrong...
Help me out
My Code..
<system.web>
<sessionState timeout="30"></sessionState>
custmerid 是用户ID
会话[CustomerId] = custmerid
请尽快给我解决方案尽可能
在此先感谢
custmerid is userid
Session["CustomerId"] = custmerid
Please Give me the Solution As soon As Possible
Thanks In Advance
推荐答案
它无法正常工作
对我们来说不是一个好消息。你必须清楚地告诉细节。无论如何检查这个。
防止C#ASP .NET中的会话超时 [ ^ ]
<system.web>
<sessionstate timeout="30" mode="InProc" cookieless="false" />
这篇关于如何避免会话超时并清除所有值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文