Hi,
Here's my situation:
I wrote an asp.net application that assigns a user a unique Id when he logs into the application. I store this unique Id in a session variable, Session("Id") = 'MyUniqueId'. I create this session variable only 1 time in the entire application, right after the user logs in.
The bug I have discovered is that about 10 percent of the time, when 2 users are logged into the application at the same time, the user who logged in first will assume the 2nd users Session("id"). Hence they will both have the same Session("id"). This causes mucho problems, as you can imagine.
I was able to prove this by saving the user's unique id on a hidden field within the page and constently checking to see if it does not match the session("id") field. Sure enough, after a user called to complain, I checked a temporary file I created to show me that the intial session("id") is no longer matching the hidden field value. It now is the same as the 2nd user to log in.
I have tried a few times to duplicate this behavior of shared session variables while I am in my application, but I have not been able to do so. Nonetheless it does appear to be happening to my users.
I have also tried to use the state server. I thought for sure this would fix the problem... But it appears to be still happening.
Am I missing something here???? Session variables seem to be pretty straight forward???
Any advice?
Thanks.
Steve
Here's my situation:
I wrote an asp.net application that assigns a user a unique Id when he logs into the application. I store this unique Id in a session variable, Session("Id") = 'MyUniqueId'. I create this session variable only 1 time in the entire application, right after the user logs in.
The bug I have discovered is that about 10 percent of the time, when 2 users are logged into the application at the same time, the user who logged in first will assume the 2nd users Session("id"). Hence they will both have the same Session("id"). This causes mucho problems, as you can imagine.
I was able to prove this by saving the user's unique id on a hidden field within the page and constently checking to see if it does not match the session("id") field. Sure enough, after a user called to complain, I checked a temporary file I created to show me that the intial session("id") is no longer matching the hidden field value. It now is the same as the 2nd user to log in.
I have tried a few times to duplicate this behavior of shared session variables while I am in my application, but I have not been able to do so. Nonetheless it does appear to be happening to my users.
I have also tried to use the state server. I thought for sure this would fix the problem... But it appears to be still happening.
Am I missing something here???? Session variables seem to be pretty straight forward???
Any advice?
Thanks.
Steve