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タイマーをリセットしますか?