Hi all,
I have an ASP.net application in which I keep the user login in session
variables.
Today, with two users accessing simultaneously the application (in
different sessions, but accessing the same page), I noticed that in some
postbacks the returned page was not the one that the user was working; the
data of the form are of the other user.
At first, I thought that it was some problem with the cache of the server -
I'm still not certain if it isn't -, but some operations in the system
depends on the login stored in session variables, and following these
operations I'm sure that the login session variable has changed with the
wrong page returned by the server.
I'm sure that this problem is not related with session expiration, in some
cases it occurs just some seconds after the login. After the "session
change", if I force postbacks by clicking in controls or links in my
application, the login session variable returns to the correct value.
Does anyone know what is happening? Any help or suggestion will be
appreciated.
Thanks in advance,
Fabrcio de Novaes Kucinskis.Please don't cross post.
Regards,
Alvin Bruney
Shameless Author plug
The Microsoft Office Web Components Black Book with .NET
http://tinyurl.com/27cok
"Fabrcio de Novaes Kucinskis" <abstrat@.uol.com.br> wrote in message
news:opskwnpzmfypy2pd@.news.microsoft.com...
> Hi all,
>
> I have an ASP.net application in which I keep the user login in session
> variables.
> Today, with two users accessing simultaneously the application (in
> different sessions, but accessing the same page), I noticed that in some
> postbacks the returned page was not the one that the user was working; the
> data of the form are of the other user.
> At first, I thought that it was some problem with the cache of the
> server - I'm still not certain if it isn't -, but some operations in the
> system depends on the login stored in session variables, and following
> these operations I'm sure that the login session variable has changed with
> the wrong page returned by the server.
> I'm sure that this problem is not related with session expiration, in some
> cases it occurs just some seconds after the login. After the "session
> change", if I force postbacks by clicking in controls or links in my
> application, the login session variable returns to the correct value.
> Does anyone know what is happening? Any help or suggestion will be
> appreciated.
> Thanks in advance,
>
> Fabrcio de Novaes Kucinskis.
I was ready to pull my hair out over the same situation. My current solution
(still testing, but so far it seems to not be causing the problem) is to ad
d the line <%@. OutputCache Location="None" VaryByParam="None" %> to my code.
I previously had <%@. Outpu
tCache Duration="1" VaryByParam="None" %>, because I figured that caching fo
r 1 second would clear the page as often as I needed, not even realizing tha
t what was probably happening is that when 2 people request the same page le
ss than 1 second apart the
second person was pulling in a cached version. Like I said, I'm still testin
g, but when I was searching for information I came across your post and want
ed to help if you hadn't solved it yet. Good luck.
Posted via DevelopmentNow Groups
www.developmentnow.com/g
www.developmentnow.com
Tuesday, March 13, 2012
Session Variables assigned to the wrong session?
Labels:
accessing,
application,
asp,
assigned,
login,
net,
session,
sessionvariables,
simultaneously,
user,
users,
variables,
wrong
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment