|
 |
asp_web_howto thread: Session Variables in one user application
Message #1 by "Jerry Diegel" <diegelj@g...> on Tue, 9 Apr 2002 15:08:39 -0500
|
|
This is a multi-part message in MIME format.
------_=_NextPart_001_01C1E002.5725DCEE
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm porting an old application to an ASP/SQL Server environment. Being
that it's a rushed project, and the application will only have one user
(who would rather do all this on a type writer), I decided to use
session variables. I figured it would save time.
The first problem I ran into was when the session would time out. I
fixed this by setting a value in the Session_onstart, and checking that
value at the top of my pages. If the value doesn't =3D True, the
session had timed out, redirect to timeout.asp. This worked fine.
However, in some areas of the site I call session.abandon. These are
areas where the user no longer needs the current values in the session.
What I've found is that after calling the abandon method, the value I
set in Session_OnStart still returns True even though all my other
session values have been abandoned. Can someone explain to me why this
is, and what I can do to work around it.
For the sake of argument, here's the little bit of code handling all
this...
************Global.asa****************
Sub Session_OnStart
Session("Alive") =3D True
End Sub
*************incSessionActive.asp*******
If Session("Alive") <> True then
Response.Redirect "Timeout.asp"
End If
Thanks,
Jerry
Message #2 by "Jerry Diegel" <diegelj@g...> on Tue, 9 Apr 2002 15:14:38 -0500
|
|
This is a multi-part message in MIME format.
------_=_NextPart_001_01C1E003.2D0BBD4E
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
oh, this happens when the user goes to one of the pages that calls
session.abandon, then hits the back button, then hits refresh.
-----Original Message-----
From: Jerry Diegel
Sent: Tuesday, April 09, 2002 3:09 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Session Variables in one user application
I'm porting an old application to an ASP/SQL Server environment. Being
that it's a rushed project, and the application will only have one user
(who would rather do all this on a type writer), I decided to use
session variables. I figured it would save time.
The first problem I ran into was when the session would time out. I
fixed this by setting a value in the Session_onstart, and checking that
value at the top of my pages. If the value doesn't =3D True, the
session had timed out, redirect to timeout.asp. This worked fine.
However, in some areas of the site I call session.abandon. These are
areas where the user no longer needs the current values in the session.
What I've found is that after calling the abandon method, the value I
set in Session_OnStart still returns True even though all my other
session values have been abandoned. Can someone explain to me why this
is, and what I can do to work around it.
For the sake of argument, here's the little bit of code handling all
this...
************Global.asa****************
Sub Session_OnStart
Session("Alive") =3D True
End Sub
*************incSessionActive.asp*******
If Session("Alive") <> True then
Response.Redirect "Timeout.asp"
End If
Thanks,
Jerry
--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
Message #3 by "Bharat Saboo" <bharatsaboo@h...> on Wed, 10 Apr 2002 09:45:17 +0530
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_003E_01C1E074.6C456580
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
just check if you r not accidentally setting the session variable to
true again in one of those pages where the users hits the refresh button
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D
Bharat Saboo
Senior Web Developer / ASP / VB 6
Radiance Associates
Riddhi Siddhi Trading Company
(Computer Division)
+xx xx xxxxxxx
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D
----- Original Message -----
From: Jerry Diegel
To: ASP Web HowTo
Sent: Wednesday, April 10, 2002 1:44 AM
Subject: [asp_web_howto] RE: Session Variables in one user application
oh, this happens when the user goes to one of the pages that calls
session.abandon, then hits the back button, then hits refresh.
-----Original Message-----
From: Jerry Diegel
Sent: Tuesday, April 09, 2002 3:09 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Session Variables in one user application
I'm porting an old application to an ASP/SQL Server environment.
Being that it's a rushed project, and the application will only have one
user (who would rather do all this on a type writer), I decided to use
session variables. I figured it would save time.
The first problem I ran into was when the session would time out. I
fixed this by setting a value in the Session_onstart, and checking that
value at the top of my pages. If the value doesn't =3D True, the
session had timed out, redirect to timeout.asp. This worked fine.
However, in some areas of the site I call session.abandon. These are
areas where the user no longer needs the current values in the session.
What I've found is that after calling the abandon method, the value I
set in Session_OnStart still returns True even though all my other
session values have been abandoned. Can someone explain to me why this
is, and what I can do to work around it.
For the sake of argument, here's the little bit of code handling all
this...
************Global.asa****************
Sub Session_OnStart
Session("Alive") =3D True
End Sub
*************incSessionActive.asp*******
If Session("Alive") <> True then
Response.Redirect "Timeout.asp"
End If
Thanks,
Jerry
--- Improve your web design skills with these new books from
Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
Message #4 by "Jerry Diegel" <diegelj@g...> on Wed, 10 Apr 2002 09:54:49 -0500
|
|
This is a multi-part message in MIME format.
------_=_NextPart_001_01C1E09F.A9B66010
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
If the user hit the refresh button, would that automatically create a
new session and call Session_OnStart, setting my value back to true?
-----Original Message-----
From: Bharat Saboo [mailto:bharatsaboo@h...]
Sent: Tuesday, April 09, 2002 11:15 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Session Variables in one user application
just check if you r not accidentally setting the session variable to
true again in one of those pages where the users hits the refresh button
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D
Bharat Saboo
Senior Web Developer / ASP / VB 6
Radiance Associates
Riddhi Siddhi Trading Company
(Computer Division)
+xx xx xxxxxxx
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D
----- Original Message -----
From: Jerry Diegel <mailto:diegelj@g...>
To: ASP Web HowTo <mailto:asp_web_howto@p...>
Sent: Wednesday, April 10, 2002 1:44 AM
Subject: [asp_web_howto] RE: Session Variables in one user application
oh, this happens when the user goes to one of the pages that calls
session.abandon, then hits the back button, then hits refresh.
-----Original Message-----
From: Jerry Diegel
Sent: Tuesday, April 09, 2002 3:09 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Session Variables in one user application
I'm porting an old application to an ASP/SQL Server environment. Being
that it's a rushed project, and the application will only have one user
(who would rather do all this on a type writer), I decided to use
session variables. I figured it would save time.
The first problem I ran into was when the session would time out. I
fixed this by setting a value in the Session_onstart, and checking that
value at the top of my pages. If the value doesn't =3D True, the
session had timed out, redirect to timeout.asp. This worked fine.
However, in some areas of the site I call session.abandon. These are
areas where the user no longer needs the current values in the session.
What I've found is that after calling the abandon method, the value I
set in Session_OnStart still returns True even though all my other
session values have been abandoned. Can someone explain to me why this
is, and what I can do to work around it.
For the sake of argument, here's the little bit of code handling all
this...
************Global.asa****************
Sub Session_OnStart
Session("Alive") =3D True
End Sub
*************incSessionActive.asp*******
If Session("Alive") <> True then
Response.Redirect "Timeout.asp"
End If
Thanks,
Jerry
--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
--- Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
to unsubscribe send a blank email to --- Improve your
web design skills with these new books from Glasshaus. Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e r-20 Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e r-20 Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e r-20 ---
|
|
 |