我们可以在ASP.net中延长会话过期时间的方式有多少?
答案 0 :(得分:1)
您可以在Session_End
中使用Global.asax
,在会话结束时提出事件
链接:http://msdn.microsoft.com/en-US/library/ee255109(v=bts.10).aspx
public class Global : System.Web.HttpApplication
{
void Session_End(object sender, EventArgs e)
{
// Code that runs when a session ends.
// Note: The Session_End event is raised only when the sessionstate mode
// is set to InProc in the Web.config file. If session mode is set to StateServer
// or SQLServer, the event is not raised.
}
}