Click to See Complete Forum and Search --> : Session Varables expiring
Hello,
I'm having a problem with session variables expiring and I hope that one
of you can help me. The problem is that the session variables that I'm using
keep expiring, even though my user session is active. I have IIS set up so
that user sessions expire after 20 minutes of inactivity.
Does anyone know what could be causing this?
Any insight would be very much appreciated.
Dan Silivestru
mad fiddler xyz
11-28-2000, 07:21 AM
Session variables are bad - well I guess that depends on how you use them,
but I have now completely replaced those I previously used on my site with
a combination of cookies and application variables.
I think that maybe your sessions are timing out and you do not realise it
- I had that exact same problem.
The default session timeout is 20 mins. This means that any session info
is lost after that period of inactivity on the site - that doesn't mean the
user has to have LEFT the site though, they could still be sat on a page
for 20 mins but do nothing and then the session would end.
The timeout period can be set via your global.asa file.
Use Session.Timeout = x in the Application_OnStart Subroutine, where x is
the timeout value in minutes.
I now use the following instead of session vars
1) Application variables:
Used for truely GLOBAL purposes, things that are going to
remain constant for all users and sessions
eg. db connections strings
2) Cookie Vars
Use to store users specific details that need to be maintined
between session
3) Query Strings
Always pass values from one page to another using the query
string (or FORM, POST/GET methods)rather than relying on
session variables
eg. myNextPage.asp?var1=temp&var2=1&var3=another
not that I am wanting to drag people away from this forum, but may I suggest
to yoy that you try
www.aspmessageboard.com
I found all I needed to know about sessions etc. on the forums there.
cheers
mf
Chris Kinsman
11-30-2000, 05:38 PM
Sessions will appear to timeout if cookies are turned off or being blocked.
"Dan" <dan@tru-solutions.com> wrote in message
news:3a233945$1@news.devx.com...
>
> Hello,
>
> I'm having a problem with session variables expiring and I hope that one
> of you can help me. The problem is that the session variables that I'm
using
> keep expiring, even though my user session is active. I have IIS set up so
> that user sessions expire after 20 minutes of inactivity.
>
> Does anyone know what could be causing this?
>
> Any insight would be very much appreciated.
>
> Dan Silivestru
devx.com
Copyright Internet.com Inc. All Rights Reserved