Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Variables are overwritten when another person logs in

Reply
Thread Tools

Variables are overwritten when another person logs in

 
 
Remco Groot Beumer
Guest
Posts: n/a
 
      11-05-2003
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


 
Reply With Quote
 
 
 
 
Chris Jackson
Guest
Posts: n/a
 
      11-05-2003
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" <(E-Mail Removed)> wrote in message
news:bob8mt$6p0$(E-Mail Removed)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
>
>



 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      11-05-2003
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" <(E-Mail Removed)> wrote in message
news:bob8mt$6p0$(E-Mail Removed)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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Win XP SP2 Logs in then Logs out awallwork at sign gmail dot com Computer Support 2 10-16-2004 08:19 PM
WinXP Home SP2 Logs on then Logs off awallwork at sign gmail dot com Computer Support 2 10-16-2004 02:28 AM
Variables are overwritten when another person logs in Remco Groot Beumer ASP .Net Web Services 2 11-05-2003 06:44 PM
Variables are overwritten when another person logs in Remco Groot Beumer ASP .Net Building Controls 2 11-05-2003 06:44 PM
Variables are overwritten when another person logs in Remco Groot Beumer ASP .Net 2 11-05-2003 06:44 PM



Advertisments