Looks like I found a solution. I am not very happy with this, but at the moment it works.
I added a hidden field to my page layout
<asp:HiddenField ID="sessionID" runat="server" />
CodeBehind
public void Page_Load(object sender, EventArgs eventArgs)
{
if (Context.Session != null) {
if (Context.Session.IsNewSession) {
if (!string.IsNullOrEmpty(sessionID.Value)) {
Response.Redirect("~/Timeout.aspx")
}
}
sessionID.Value = Context.Session.SessionID;
}
}
Web.config ASP
<sessionState cookieless="true" regenerateExpiredSessionId="false"/>
ExpiredSessionId .