如果浏览器空闲5分钟,则会话超时 [英] Session Time out if browser is idle for 5 minutes

查看:659
本文介绍了如果浏览器空闲5分钟,则会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我们使用c#在asp.net中开发Web应用程序。我们使用IIS7.0和windows vista进行开发。

我使用的是Windows身份验证和本地系统身份。

如果用户在5分钟后没有访问网站5分钟(意味着浏览器闲置5分钟),我希望这样。当用户点击任何链接时,他的会话应该过期,并且他必须再次提供登录凭据。


我尝试过使用

< sessionState cookieless = "假QUOT; mode =" InProc timeout =" 5" />


在web.config文件中但它无法正常工作。


请在这个问题上帮助我。


谢谢

Anu

Hi All,

We r developing web application in asp.net using c#. we r using IIS7.0 and windows vista for development.
I m using windows authentication and "local Sytem" Identity.
I want that if user is not accessing site for 5 minutes(means browser is idle for 5 min) , after 5 min. when user clicks on any link, his session should be expired and he has to provide login credentials again.

I have tried using
<sessionState cookieless="False" mode="InProc timeout="5" />

in web.config file but its not working.

Please help me in this issue.

Thanks
Anu

推荐答案

嗯,你试过去IIS配置并更改那里的值吗? br />

另外,你是否在每次加载页面时验证会话?
Hmm, have you tried going to the IIS config and changing the value there?

Also, do you validate the Session on every page load?





感谢您的回复。


不,我不知道abt aspx''n''。net。如何验证会话?


问候

Anu


Hi

Thanks for reply.

No i dont know much abt aspx ''n'' .net. How to validate the session?

Regards
Anu



嗯,你试过去IIS配置并更改那里的值吗?



另外,你是否在每次加载页面时验证会话?
Hmm, have you tried going to the IIS config and changing the value there?
.
Also, do you validate the Session on every page load?


我的意思是,你希望会话超时。所以你必须用Session对象做一些事情?就像保留登录名或其他内容一样。

如果你检查以确保用户已登录在每个页面,当会话超时并被清除时,用户将不再登录。你应该能够发现它。
Well I mean, you want the session to timeout. so you must be doing something with the Session object? Like holding onto a login name or something.
If you check to make sure the user is "logged in" at every page, when the session timesout and gets cleared, the user will no longer be "logged in" and you should be able to detect that.


这篇关于如果浏览器空闲5分钟,则会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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