Last post Apr 11, 2012 04:57 PM by seiko88
Apr 11, 2012 02:06 PM|seiko88|LINK
Hello. In my web application, when i debugging, all users share the same session.
This is my login page. I need every user to have his own session, what should i do? Now, when i am logging on a broset, login with new user, set somenting and open the site in another browser, i can see what i have done in first browser :(
var customer = Query.GetCustomer(txtEmail.Text);
if (customer == null)
lblError.Visible = true;
if (PasswordEncrypt.IsValidPassword(txtPassword.Text, EncryptedPassword, Salt))
lblError.Visible = true;
Apr 11, 2012 02:28 PM|ramanselva|LINK
Can you check are you creating any cookies in client end like
Remember Me by default..
Apr 11, 2012 02:36 PM|seiko88|LINK
All is clear. I deleted all datas from both browsers, rebuild the application, but the problem still exist
Apr 11, 2012 03:29 PM|BrockAllen|LINK
If you have different users seeing the same session (and thus the same data in the HTML) then it might be because the pages are being cached.
Apr 11, 2012 03:54 PM|seiko88|LINK
I explained myself wrong. Not the same sessions, the same data from my application. I have userID, first when is logged in, the userID become the userID, when the second user log in the userID becomes userID2, and the first user use userID2.
Apr 11, 2012 03:59 PM|BrockAllen|LINK
Yep, again... sounds like a page caching issue. Are you doing any explicit page caching? Also, since you have users that are authenticated you should be using SSL and that will disable server caching for those requests (which might be the issue). Are you
currently using SSL?
Apr 11, 2012 04:28 PM|seiko88|LINK
I dont have explicit caching and i am using SSL. One day lost to a stupid problem and no solution yet...
Apr 11, 2012 04:36 PM|BrockAllen|LINK
Well, the the only other thing I can think of is this line of code:
Is that a static/global instance? If so, then all HTTP requests are using that same instance and thus accidently getting the same "logged in" user.
Apr 11, 2012 04:40 PM|seiko88|LINK
public class WebOrder
Thanks for you time :)
Apr 11, 2012 04:43 PM|BrockAllen|LINK
So that was the problem?
Apr 11, 2012 04:47 PM|seiko88|LINK
No :) but u said " the only other thing" and i thought you dont have any others ideas why this happening :)
Apr 11, 2012 04:52 PM|BrockAllen|LINK
Well, if it's global... doesn't that mean each request is sharing the same instance? I guess there's just not enough code to know or understand what else is going on... but given the limited info and that it's hard to debug through the forums, yes, I'm out
of ideas. :)
Apr 11, 2012 04:57 PM|seiko88|LINK
Yes. thanks a lot! I checked this many rimes but i was looking in the wrong place. Damn!