using state in servercontrols

T

ton

Hi,
I keep several variables in a statevalue like:
Dim session As SessionState.HttpSessionState =
System.Web.HttpContext.Current.Session

session("connect") = " FKHFSF "
This is done on the customserver control.

I thought that these variables would be the exclusive use of one connected
user/connection. But it looks like that in a multiuser enviroment the
variables are shared. So I end on the page somenone else was editing.

What am I missing here. (I have not modified any property of the session
variable). Is it not possible to use the
System.Web.HttpContext.Current.Session in the custom control ?

Ton
 
T

ton

I've checked the sessionID property, for all users this ID is the same.
So what is wrong ?
Ton
 
S

Scott

What do you mean by a multiuser environment and what kind of browsers are your users using? The
reason I'm asking is that in our application if a user logs into the our application using a Mozilla
browser and starts another browser they will share the session state cookie handle (IE behaves the
way one would like, but if you do a CTRL-N you can get a browser with same session as the original
browser).

You are correct that sessions aren't to be shared -- but there's a dance between the web server and
the browser to setup the session and if that breaks down this kind of thing might happen. We see the
same thing in with our customers that use Firefox (or whatever it's called these days) when using
tabs.

Scott
 
T

ton

multiuser is, several users open my webpage. All using Internet explorer.
The case is that entering my webpage, they have to fill in the logon. These
variables are put in sessionstate variables like:
Dim session As SessionState.HttpSessionState
=System.Web.HttpContext.Current.Session
session("connect") = "server=xx;database=yy
session( "user"")=naam
and so on

but when I open the page on a second pc, the values get overwritten. Even
the sessionID is the same. The other values look like that these are
overwritten by the second user who opens the page.
Someone else suggested to use Viewstate, but is session not the same as
viewstate.

Can you give me some advise

Ton
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top