Losing session objects

N

Not Me

Hi,

I have a set of pages that use forms authentication for access. There
are times when one of the session objects I'm using appears to
disappear. The session is not timing out, however. (if I go to a page
that doesn't use that specific object it works fine and I'm not
redirected to the login page)

Apologies if I'm using the incorrect terminology.. the session object
I'm using is a class of my own, which features several private variables
and get/set methods.

I create the object in the login page:
dim mySessionObject as new SessionObject()
session("mySessionObject") = mySessionObject

Then use the gets/sets at various stages of the application.

Could it be that the object is being 'cleaned up' at arbitrary times due
to it not being accessed? or should it stay where it is once it's been
assigned to the session (at least until the session expires)?


Ta for any help,
Chris
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

The session object is the one you reference using the name Session. When
you store your object you are using a session variable.

A session object is never partially timed out. When a session times out
all session variables are lost.

If only one of the session variables gets lost, the most likely reason
is that you are actually removing it somewhere in your code.
 
N

Not Me

The session object is the one you reference using the name Session. When
you store your object you are using a session variable.

A session object is never partially timed out. When a session times out
all session variables are lost.

If only one of the session variables gets lost, the most likely reason
is that you are actually removing it somewhere in your code.

Thanks for the confirmation.. looks like I'll have to debug a bit
further.. it certainly only happens very occasionally

cheers,
Chris
 
N

NumbLock

I have seen this happen before. It could be that your session actually
is timing out. There is a session timeout and an authentication
timeout. The fact that you are not redirected to the login page does
not prove that your session has not timed out.

Here is a good site with info on detecting a session timeout:

http://aspalliance.com/520
 
N

Not Me

NumbLock said:
I have seen this happen before. It could be that your session actually
is timing out. There is a session timeout and an authentication
timeout. The fact that you are not redirected to the login page does
not prove that your session has not timed out.

Here is a good site with info on detecting a session timeout:

http://aspalliance.com/520

Ta for that, much appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top