S
Simon Harvey
Hi everyone,
If anyone can help me with the following I would be very greatful.
In order to determine when a session has timed out I have some code in each
page that does something like:
loadSessionData(); // Populates a variable called sessionState
if(sessionState.currentUser != null){
// Carry on
}
else{
Response.Redirect("/misc_pages/sessionExpired.aspx");
}
My problem is I often have to send out links in emails that jump right into
the secure section of the site. If a session isnt detected it should quietly
take the user to the login page and then once the user enters their details,
redirect them to the secure page they were trying to get to before. This all
sounds fine in theory but the problem is that the code above just identifies
the fact that there isn't any session information and assumes that the
situation is a session timeout - which it isnt.
So I guess my question is:
How can I easily distinguish between occasions when a user's session has
timed out and occasions when the user has just tried to jump into a secure
area of the site without logging in?
If anyone can help me I would be very greatful.
Thanks in advance everyone
Kindest Regards
Simon
If anyone can help me with the following I would be very greatful.
In order to determine when a session has timed out I have some code in each
page that does something like:
loadSessionData(); // Populates a variable called sessionState
if(sessionState.currentUser != null){
// Carry on
}
else{
Response.Redirect("/misc_pages/sessionExpired.aspx");
}
My problem is I often have to send out links in emails that jump right into
the secure section of the site. If a session isnt detected it should quietly
take the user to the login page and then once the user enters their details,
redirect them to the secure page they were trying to get to before. This all
sounds fine in theory but the problem is that the code above just identifies
the fact that there isn't any session information and assumes that the
situation is a session timeout - which it isnt.
So I guess my question is:
How can I easily distinguish between occasions when a user's session has
timed out and occasions when the user has just tried to jump into a secure
area of the site without logging in?
If anyone can help me I would be very greatful.
Thanks in advance everyone
Kindest Regards
Simon