As mentioned in the forum you need to implement an IHttpModule and redirect the context'e AcquireRequestState event to your method which goes this:
void Application_AcquireRequestState(object sender, EventArgs e)
{
if (HttpContext.Current.Session != null && HttpContext.Current.Session.IsNewSession)
{
if (HttpContext.Current.Request.Cookies != null && HttpContext.Current.Request.Cookies["ASP.NET_SessionId"] != null)
{
HttpContext.Current.Session.Clear();
HttpContext.Current.Response.Redirect("/Errors/SessionTimeout.aspx", true);
}
}
}
}
EnableSessionState="False"