开发者

Session state to use only one user

开发者 https://www.devze.com 2023-03-15 16:59 出处:网络
I have bool variable in my session state. When I try to get this value I get for all users. When I login like another user who doesn`t have initialize Session state, I got same value.

I have bool variable in my session state. When I try to get this value I get for all users. When I login like another user who doesn`t have initialize Session state, I got same value.

     bool aa = (bool)Session["playedSRB"];

I was thinkin开发者_如何学运维g this is related to the user.


I don't believe the session state cookie is associated with who is logged in.

ASP.NET_SessionId is the session cookie.

.ASPXAUTH is the authentication cookie (login).


..It might not be your problem, but I'd suggest testing with true instead - a null value cast to bool converts to false.

0

精彩评论

暂无评论...
验证码 换一张
取 消