tags:

views:

17

answers:

1

Hi,

I'm storing my user details in the session variable. When some I/O operation happens the other users session also destroying. If I run the same application in the Single server environment the session is working fine.

I have tested with this code also {meta name='test' content='Set-Cookie: ASPSESSIONID=494351627; path=/' /}

What would be the problem?

Thanks in advance.

+1  A: 

Probably the App Pool would be restarting. This could happen every couple of minutes if there is a shared server with several sites sharing an app pool and the app pool is set to recycle if it uses up too much memory.

The only fixes for this are: a) move onto a different hosting environment b) use cookies to identify the user and look them up in the database (eg store an encrypted user ID in a cookie and store any related data in the database)

If you have a lot of other stuff in session memory you could consider implementing a database table just for storing session state (in classic asp you would have to roll your own - in .net this is a standard config option).

If it is a big app with a lot of reliance of session variables you would want to go for option A if possible.

mike nelson