Hi all.
I'm having an issue which occurs only after the session has timed out. My website auto-logs out after a set period, and redirects the user to the login page. If you then try to log back in, you get stuck in an endless loop, repeatedly being signed out and returned the log in page. The user is being logged out by the following code:
void Session_Start(object sender, EventArgs e)
{
if (Session != null
&& Session.IsNewSession)
{
var cookieHeader = Request.Headers["Cookie"];
if (cookieHeader != null)
{
if (cookieHeader.IndexOf("ASP.NET_SessionId") >= 0)
{
if (User.Identity.IsAuthenticated)
{
FormsAuthentication.SignOut();
Response.Redirect("Logon.aspx");
...
Go to the complete details ...