Session - Screen Switches for no apparent reason.

G

Guest

I'm not sure what to think of this. In the appliacation, upon postback,
users screens will get mixed up. Meaning... Perhaps on my screen im working
with a particular set of data. I click a button to cause a post back, then
all of the sudden someone elses data comes up. If I hit the refresh button,
my data comes back again.

Here are the details.

..aspnet app using VB.net
Developed using Visual studio 2002, converted to 2003. problem existed
before and after the conversion.
Intranet App only. No outside users.
IIS6 and IIS 5 (tried both)

A user(none in particular) logs in to my application using forms
authentication. Their ID number is stored in session. Different reports and
data are rendered based upon this Id number. At the top of every screen is
who they are based upon the Id they entered. As the user moves through the
application, clicking on various things, their screen gets mixed up with
another users within my Domain. So perhaps at the top I'm logged in as Tom
Callahan, I click a button and next thing I know I'm logged in as John
smith. If I call john smith, He doesn't see my screen necessarily. I hit
the refresh button and my screen comes back correctly. The 2 people are one
the same domain, but geographically speaking they are not necessarliy in the
same building.

This happens rarely, but it seems to be reported more often. One time, we
were holding a class with about 10 people, and about 5 of the 10 people got
someone elses screen who was in the class. and one person got someone who
was not in the class.

It seems like something on the server happens (a hiccup) or an error, then
people get switched. I thought perhaps that it had to do with someone
generating an error within the system, but I have proven that to be not
true. It's also not isolated to servers as I have moved it from a 2k3
server to a 2000 server (different box), but the problem still occured. I
have since moved it back.


Any help in this matter would be appriciated. This has stumped me for quite
a while.


Tom Callahan
 
K

Kevin Spencer

How are you storing Session? In Proc, Out of Proc, State Server, SQL Server?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
G

Guest

Good Question.
InProc
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false" timeout="100"/>
 
B

bruce barker

your are probably storing session values in a vb module as public
properties. as these are shared between all threads, two concurent page will
have problems, as changing in one changes for all.


-- bruce (sqlwork.com)


| I'm not sure what to think of this. In the appliacation, upon postback,
| users screens will get mixed up. Meaning... Perhaps on my screen im
working
| with a particular set of data. I click a button to cause a post back,
then
| all of the sudden someone elses data comes up. If I hit the refresh
button,
| my data comes back again.
|
| Here are the details.
|
| .aspnet app using VB.net
| Developed using Visual studio 2002, converted to 2003. problem existed
| before and after the conversion.
| Intranet App only. No outside users.
| IIS6 and IIS 5 (tried both)
|
| A user(none in particular) logs in to my application using forms
| authentication. Their ID number is stored in session. Different reports
and
| data are rendered based upon this Id number. At the top of every screen is
| who they are based upon the Id they entered. As the user moves through
the
| application, clicking on various things, their screen gets mixed up with
| another users within my Domain. So perhaps at the top I'm logged in as
Tom
| Callahan, I click a button and next thing I know I'm logged in as John
| smith. If I call john smith, He doesn't see my screen necessarily. I
hit
| the refresh button and my screen comes back correctly. The 2 people are
one
| the same domain, but geographically speaking they are not necessarliy in
the
| same building.
|
| This happens rarely, but it seems to be reported more often. One time, we
| were holding a class with about 10 people, and about 5 of the 10 people
got
| someone elses screen who was in the class. and one person got someone who
| was not in the class.
|
| It seems like something on the server happens (a hiccup) or an error, then
| people get switched. I thought perhaps that it had to do with someone
| generating an error within the system, but I have proven that to be not
| true. It's also not isolated to servers as I have moved it from a 2k3
| server to a 2000 server (different box), but the problem still occured. I
| have since moved it back.
|
|
| Any help in this matter would be appriciated. This has stumped me for
quite
| a while.
|
|
| Tom Callahan
|
|
 
G

Guest

Bruce, You could be on to something. Her is how I am doing it.i have a
classfile called sessioninfo with this info in it
Shared Sub New()
SessionInfo.whoami_ID = String.Empty
SessionInfo.whoami_Name = String.Empty
SessionInfo.LastPage = String.Empty
SessionInfo.LastException = Nothing
End Sub


Public Shared Property whoami_ID() As String
Get
Return HttpContext.Current.Session("whoami_ID").ToString()
End Get
Set(ByVal Value As String)
HttpContext.Current.Session("whoami_ID") = Value
End Set
End Property

then i can get or set the Session ID like so

sessioninfo.whoami_ID = whoami_id

However I do not always Get the Id the same way. I sometimes use this
method.

Id = Session("whoami_id")

Others have used the above method without any problems. Also if it is
really a problem, why is it that when the user refreshes his or her
browser, the right data comes in. its almost as if the server got confused
for a moment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top