Variables are overwritten when another person logs in

Discussion in 'ASP .Net' started by Remco Groot Beumer, Nov 5, 2003.

  1. 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
     
    Remco Groot Beumer, Nov 5, 2003
    #1
    1. Advertising

  2. Use session variables to store information that is specific to a given user
    session.

    --
    Chris Jackson
    Software Engineer
    Microsoft MVP - Windows XP
    Windows XP Associate Expert
    --
    More people read the newsgroups than read my email.
    Reply to the newsgroup for a faster response.
    (Control-G using Outlook Express)
    --

    "Remco Groot Beumer" <> wrote in message
    news:bob8mt$6p0$1.nb.home.nl...
    > 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
    >
    >
     
    Chris Jackson, Nov 5, 2003
    #2
    1. Advertising

  3. 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

    "Remco Groot Beumer" <> wrote in message
    news:bob8mt$6p0$1.nb.home.nl...
    > 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
    >
    >
     
    Mark Fitzpatrick, Nov 5, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leny
    Replies:
    4
    Views:
    483
    Michael Mair
    Jan 11, 2005
  2. Remco Groot Beumer

    Variables are overwritten when another person logs in

    Remco Groot Beumer, Nov 5, 2003, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    128
    Mark Fitzpatrick
    Nov 5, 2003
  3. Remco Groot Beumer

    Variables are overwritten when another person logs in

    Remco Groot Beumer, Nov 5, 2003, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    125
    Mark Fitzpatrick
    Nov 5, 2003
  4. Remco Groot Beumer

    Variables are overwritten when another person logs in

    Remco Groot Beumer, Nov 5, 2003, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    113
    Mark Fitzpatrick
    Nov 5, 2003
  5. Rahul Chatterjee

    session variables getting overwritten

    Rahul Chatterjee, Aug 2, 2005, in forum: ASP General
    Replies:
    4
    Views:
    148
    Mark Schupp
    Aug 2, 2005
Loading...

Share This Page