G
Guest
Hi
We are developing an ASP.NET application is being accessed by multiple users simultaneously. We are facing a problem in retrieving the ASP.NET session of the logged on users correctly. Let me explain u using a code snippe
string strUsername = Session["User"]
Session objSession = GetSession(strUsername)
The above code is executed in almost all pages to fetch the user session.
When mutilple users are simulteneoulsy accessing the application, the user name retrieved from the Session is not for the current user but for someother user who is currently logged on to the system
For example, if users user1,user2, and user3 are currently logged into the system, and if I try to retrieve the APS.NET session variable for user 'user1', I sometimes get the session of either user2 or user3. This is also not consistent. If i refresh this problem is NOT observed. So in the above code snippet when i'm expecting to retrieve the session username of 'user1' using 'Session["Username"]', I get the value as either 'user2' or 'user3'
I'm not able to figure out this problem. It'll be great if someone can help in resolving the issu
Thanking you in advance
Regard
Phanidha
We are developing an ASP.NET application is being accessed by multiple users simultaneously. We are facing a problem in retrieving the ASP.NET session of the logged on users correctly. Let me explain u using a code snippe
string strUsername = Session["User"]
Session objSession = GetSession(strUsername)
The above code is executed in almost all pages to fetch the user session.
When mutilple users are simulteneoulsy accessing the application, the user name retrieved from the Session is not for the current user but for someother user who is currently logged on to the system
For example, if users user1,user2, and user3 are currently logged into the system, and if I try to retrieve the APS.NET session variable for user 'user1', I sometimes get the session of either user2 or user3. This is also not consistent. If i refresh this problem is NOT observed. So in the above code snippet when i'm expecting to retrieve the session username of 'user1' using 'Session["Username"]', I get the value as either 'user2' or 'user3'
I'm not able to figure out this problem. It'll be great if someone can help in resolving the issu
Thanking you in advance
Regard
Phanidha