会话过期问题 [英] session expiration problem

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

问题描述

除非用户单击应用程序界面中的注销,否则会话不应过期.现在,会话在 [OP的帖子中缺少信息] 之后自动超时.满足以上需求的会话模式应该是什么?

提前谢谢!

[OP的原始文件] 会话sd在用户单击注销之前不会过期.
现在,它在< sessionstate timeout ="180">
之后过期 要达到以上需求的会话模式是什么sd.

提前谢谢
[/OP的原始内容]

The session should not expire unless the user clicks logout from the application interface. Right now the session automatically times out after [Information missing from OP''s post]. What should be the session mode to achieve the above need?

Thanks in advance!

[OP''s Original]session sd not get expire until user clicks logout.
right now it''s expires after <sessionstate timeout="180">
what sd be the session mode to achive above need.

thx in advance
[/OP''s Original]

推荐答案

通常,超时时间是在闲置20分钟之后,因此会话在此之后会自动超时在该时间间隔内,用户与网站之间没有任何互动(从这个意义上讲,后台的AJAX调用确实算作活动).您可以在服务器上配置此超时: sessionState元素(ASP.NET设置架构) [ ^ ].
超时不能超过525,600分钟,大约一年左右.

您还应该考虑使用基于SQL Server的 StateServer [在此处阅读IIS 7.0 [ ^ ]和
Usually the timeout is after 20 minutes of inactivity so that the session times out automatically after there was no interaction whatsoever of the user with the website for that time interval (AJAX calls in the background do count as activity in this sense). You can configure this timeout on your server: sessionState Element (ASP.NET Settings Schema)[^].
The timeout can not be greater than 525,600 minutes which is around a year or so.

You should also consider using a SQL Server based StateServer[^] as the session-state mode. The worker processes are recycled from time to time and if you don''t persist your session states the session''s state information will be lost. So beware, you have been warned! :) If you want to now how to control the recycling of the worker processes, please read here for IIS 7.0[^] and read here for IIS 6.0[^].
[/Edit]

Regards,

Manfred


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

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