更新时间:2023-12-04 18:24:47
使用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 yourGlobal.asax
, insert the code below.
void Session_End(object sender, EventArgs e)
{
Response.Redirect("Login.aspx");
}
问候,
爱德华
Regards,
Eduard