Click here to Skip to main content
15,888,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
In my application I have one interface which has 3 derived classes. On my login Page I declared the object for an interface. When a user clicks login button, based on the user status I create one of the derived classes and add the interface object into a "Session". But once the user is login and inside some pages, when the multiple user try to do the same task, the session gets values of another user.
Is there any solution to solve this issue?
I am working on C#, ASP.NET. If anyone does not understand my question please let me know, so I can explain it in more details.

Thank.
Posted
Comments
badprog 30-Nov-10 19:15pm    
Is multiple user defined as an account with different privileges in your application?
fjdiewornncalwe 30-Nov-10 19:24pm    
Can you show us how you insert the values into a "Session". My hunch is that you are not using the session at all, but rather "Application".

1 solution

The session object is unique for a user(client browser) and is defined by the session id which is stored in the client cookie.

Do not forget that on the server side the session object by default is being kept for 20 minutes after the last browser activity on the site.

So if you are testing from the same computer impersonating different users you may see the previous session object.

If your multiple user comes from the same browser/session, then, of course, you will have this problem, otherwise you should not.
If you want to have more specific answer you should show the code.

At the moment, maybe my answer would help you better analyze the problem.
Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900