我如何在关闭浏览器上使用global.asax页面注销当前会话 [英] how i use global.asax page for logout current session on close browser
问题描述
void Session_End(object sender,EventArgs e)
{
}
如何工作,当我的退出空闲时间是20分钟
伙计们,我需要一个我的asp的JavaScript代码.net项目,
1)关于浏览器关闭当前会话到期(注销)。
2)但不能在回发,按钮点击,超链接中注销。
3)并在会话空闲时间超过20分钟时自动注销
4)代码支持至少3个浏览器google chrome,firefox,IE,b'coz我的代码不支持firefox。
plz帮助我
void Session_End(object sender, EventArgs e)
{
}
how this works, when my idle time for logout is 20minute
Guys, i need a javascript code for my asp.net project,
1) on browser close current session expire(logout).
2)but not logout in postback , button click, hyperlink.
3)and automatic logout when session idle time exceed 20 minute
4)code support atleast 3 browsers google chrome, firefox, IE, b'coz my code not support in firefox.
plz help me
推荐答案
您的网络应用程序会在第一位访问者点击您的网页时立即启动。对于每个不同的用户,将创建会话。会话有一定的到期时间。如果用户停止浏览您的网站,会话将在服务器上次命中的 expirationTime 之后到期。 ( expirationTime 默认为20分钟)
每次会话到期时,将执行上述方法。
最后一个会话到期后,也会执行Application_End()。
你不能手动调用方法来使你的会话过期。
Eduard
Your web application starts as soon as the first visitor hits your page. For each different user, a session will be created. A session has a certain expiration. If the user stops browsing your website, the session expires after expirationTime of the last hit on your server. (expirationTime has a default of 20 minutes)
Each time a session expires, the method above will be executed.
After the last session expires, also Application_End() will be executed.
You cannot call the method manually to expire sessions when you want.
Eduard
这篇关于我如何在关闭浏览器上使用global.asax页面注销当前会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!