使用HttpContext.SetSessionStateBehavior Method时,如果我们禁用会话状态,如:
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (!Context.Request.Path.EndsWith("/Service.svc"))
{
Context.SetSessionStateBehavior(SessionStateBehavior.Default);
}
else
{
Context.SetSessionStateBehavior(SessionStateBehavior.Disabled);
}
}
在Global类的Application_BeginRequest方法中,这是否意味着我们设置SessionStateBehavior.Disabled的任何请求都不会延长现有会话?换句话说,禁用会话状态行为的请求会重置HttpSessionState.Timeout计时器吗?