会话超时时将用户重定向到徽标页面. [英] Redirect user to logoof page when session timeout.

查看:71
本文介绍了会话超时时将用户重定向到徽标页面.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户闲置了web.config中指定的时间后,如何将用户重定向到注销页面.是否可以使用Global.asax的session_end事件?

在此先感谢.

How to redirect user to logoff page when user is idle for the time specified in web.config. Does it possible using Global.asax''s session_end event?

Thanks in advance.

推荐答案

请查看javascript计时器-
此处 [ ^ ]
此处 [
Please look at javascript timer -
Here[^]
and Here[^].

Set it equal to your session timeout and on timeout navigate to a page that executes the logoff procedure. The user can then be redirected to wherever - the login page for example - telling them their session has expired.

Be careful of this technique if you expect the user to remain on a page for longer than the timeout.

You should back this up with code in Global.asax Session_End to perform any server side logoff processes to guard against browsers being directly closed by users.


这篇关于会话超时时将用户重定向到徽标页面.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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