Ray, Cheers for the (exceptionally quick) reply,
This is the senariono, A user goes to my site and initially we are not
concernecd with sessions.
They then go onto a booking section. This booking section stores all
information in a database.
When a user starts a booking a new record is stored in the database with a
PK (integer) this PK is stored in a session variable (session("ID") so that
the user on the site can always connect to their required records in the
database.
However if the session expires then session("ID") is not availible.
At this point I want to tell the user that their session has expired.
However, the following code ALWAYS tells me the Session("ID") is numeric,
even if it does not exist.
if ISNUMERIC(Session("ID")) then
Response.Write("Session('ID') is numeric -- it is Alive -- session ID is
")
else
Response.Write("Session('ID') is not numeric -- it is dead") end if
I guess what I am asking in a nutshell is how I tell if the sesion has
expired.
Or maybe ISNUMERIC has a bug, returning true when the Session("ID") is
clearly empty ...:)
There are two different senarios for checking if the session has expired.
1. The user has not been assigned a session("ID") yet --- This seems to be
the most difficult case,
2. They are midway through the process, they have already been assigned a
session ID but the session has expired.
cheers
martin.
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl...
"David B" <da*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hi,
Could somebody please tell me how I check whether a session is dead based soley on the Session.SessionID.
At present the timeout is set to 20 minutes in IIS, I am aware that I
can reset this on the page. However after 22 minutes, or some interval
longer than the session timeout, the Session.SessionID values is still
availible.
A new ID will be created.
What I want to achieve is this. There is a small section of my site that
must have an active session.
The user will have an active session if he hits your site, even if that
section is the first place he goes.
When a user enteres this part of the site I
must check if the session is still active because I am going to want to
create variable in the sesion object. If the session is dead, I have to
figure out how I am going to handle this,
Can anybody suggest how to do this?? I am thinking I could either bring
the session back to life, is this possible??
It happens on its own by the user hitting the server.
What is it that you really want to do? What is it that makes you need
what you describe?
Ray at home