我想在会话超时后,将用户重定向到登录页面.session.means [英] i want to redirect the user to the login page after the expiration of session.means after session timeout

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

问题描述

我想在会话期满后将用户重定向到login.aspx页面.会话超时后表示均值.怎么可能请plz告诉我先生.........

i want to redirect the user to the login.aspx page after the expiration of session.means after session timeout.how it can possible plz tell me sir.........

推荐答案

使用web.config文件中的设置,如下所示:

Use the setting in web.config file as shown:

<authentication mode="Forms">
     <forms cookieless="UseCookies" defaultUrl="HomePage.aspx"

    loginUrl="UnAuthorized.aspx" protection="All" timeout="30">
          </forms>
</authentication>



在上面的代码中,使用cookieless和timeout属性来进行招聘.
阅读完整的文章:
ASP.NET成员资格和角色提供者 [



In the above code use cookieless and time out attribute to get your recruitment.
Read complete article:
ASP.NET Membership and Role Provider[^]


http://geekswithblogs.net/shahed/archive/2007/09/05/115173.aspx [ http://csharpdotnetfreak.blogspot.com/2008/11/detecting-session- timeout-and-redirect.html [ ^ ]
http://geekswithblogs.net/shahed/archive/2007/09/05/115173.aspx[^]

http://csharpdotnetfreak.blogspot.com/2008/11/detecting-session-timeout-and-redirect.html[^]


在您的Global.asax中,插入以下代码.

In your Global.asax, insert the code below.

void Session_End(object sender, EventArgs e)
{
   Response.Redirect("Login.aspx");
}



问候,
爱德华



Regards,
Eduard


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

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