Variables are overwritten when another person logs in

  • Thread starter Thread starter Remco Groot Beumer
  • Start date Start date
R

Remco Groot Beumer

Hello

I've created an ASP.NET page, which uses some variables which are set after
login.
When person A logs in, a new public object is instanced (i'm not sure if
that is a correct word), after which the variables are set. The problem
occurs when person B logs in at the site. After he logs in, all the
variables of person A are overwritten with the new ones.

How can I prefent this (I think a new instance need to be created every time
a person logs in).

Thank you very much.

Remco Groot Beumer
 
Use session variables to store information that is specific to a given user
session.
 
Are you storing them in an application object? If so then this would be the
behavior that would be expected becaues the Application object pool is
globally shared across the entire app (meaning there's only one instance of
any object for everyone to use). Storing things in the application session
would be better because a session is basically a sandbox for each visitor
and seperate from the other users.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Back
Top