473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Session variable are shared between users

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

session("connect") = " FKHFSF "

I thought that these variables would be the exclusive use of one connected
user/connection. But it looks like that in a multiuser enviroment some
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)

Ton
Nov 18 '05 #1
5 4468
No other code than that ? It looks like it should work (of course all users
will have the same connect value if you store always FKHFSF for all users).
What if you are using directly System.Web.HttpContext.Current.Session.

Other than that , it would like as if you were using a shared property
somewhere...

Patrice
"ton" <vr*@REMOVEhome.nl> a écrit dans le message de
news:c4**********@news1.tilbu1.nb.home.nl...
Hi,
I keep several variables in a statevalue like:
Dim session As SessionState.HttpSessionState =
System.Web.HttpContext.Current.Session

session("connect") = " FKHFSF "

I thought that these variables would be the exclusive use of one connected
user/connection. But it looks like that in a multiuser enviroment some
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)

Ton

Nov 18 '05 #2
ton
No other code than that ! I save the logged in user, the page where I, the
details, the recordID of the record they asked.

but when 2 users connect via internet with my page, the values get mixed up.
I have to say that I've developed a Customserver control and that is using
the state variable

Ton
"Patrice" <no****@nowhere.com> schreef in bericht
news:eZ**************@tk2msftngp13.phx.gbl...
No other code than that ? It looks like it should work (of course all users will have the same connect value if you store always FKHFSF for all users). What if you are using directly System.Web.HttpContext.Current.Session.

Other than that , it would like as if you were using a shared property
somewhere...

Patrice
"ton" <vr*@REMOVEhome.nl> a écrit dans le message de
news:c4**********@news1.tilbu1.nb.home.nl...
Hi,
I keep several variables in a statevalue like:
Dim session As SessionState.HttpSessionState =
System.Web.HttpContext.Current.Session

session("connect") = " FKHFSF "

I thought that these variables would be the exclusive use of one connected user/connection. But it looks like that in a multiuser enviroment some
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)

Ton


Nov 18 '05 #3
ton
No other code than that ! I save the logged in user, the page where I, the
details, the recordID of the record they asked.

but when 2 users connect via internet with my page, the values get mixed up.
I have to say that I've developed a Customserver control and that is using
the state variable

Ton
"Patrice" <no****@nowhere.com> schreef in bericht
news:eZ**************@tk2msftngp13.phx.gbl...
No other code than that ? It looks like it should work (of course all users will have the same connect value if you store always FKHFSF for all users). What if you are using directly System.Web.HttpContext.Current.Session.

Other than that , it would like as if you were using a shared property
somewhere...

Patrice
"ton" <vr*@REMOVEhome.nl> a écrit dans le message de
news:c4**********@news1.tilbu1.nb.home.nl...
Hi,
I keep several variables in a statevalue like:
Dim session As SessionState.HttpSessionState =
System.Web.HttpContext.Current.Session

session("connect") = " FKHFSF "

I thought that these variables would be the exclusive use of one connected user/connection. But it looks like that in a multiuser enviroment some
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)

Ton



Nov 18 '05 #4
Ho do you test the multi-user environment?
Do you just open up the second browser?
If you opening it by using new window then you get the same session.
It's by design (of Browser).

Try to do the real test. From 2 different machines for example.

I can assure you that it works (unless your system is messed up big time)

George.

"ton" <vr*@REMOVEhome.nl> wrote in message
news:c4**********@news1.tilbu1.nb.home.nl...
Hi,
I keep several variables in a statevalue like:
Dim session As SessionState.HttpSessionState =
System.Web.HttpContext.Current.Session

session("connect") = " FKHFSF "

I thought that these variables would be the exclusive use of one connected
user/connection. But it looks like that in a multiuser enviroment some
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)

Ton

Nov 18 '05 #5
ton
it does not work on a second system.
But I've solved it allready. It looks that using sessionstate variables in a
customserver control is not reliable.
I've changed it to viewstate and now it works. Allthough I have to save de
logon values in a sessionstate, then when opening the second page (with
another customservercontrol) I read the sessionstate variable and save them
in viewstate. With these variabele I keep on using without any problem when
other users are opening the same page.

ton
"George Ter-Saakov" <no****@hotmail.com> schreef in bericht
news:ei**************@TK2MSFTNGP11.phx.gbl...
Ho do you test the multi-user environment?
Do you just open up the second browser?
If you opening it by using new window then you get the same session.
It's by design (of Browser).

Try to do the real test. From 2 different machines for example.

I can assure you that it works (unless your system is messed up big time)

George.

"ton" <vr*@REMOVEhome.nl> wrote in message
news:c4**********@news1.tilbu1.nb.home.nl...
Hi,
I keep several variables in a statevalue like:
Dim session As SessionState.HttpSessionState =
System.Web.HttpContext.Current.Session

session("connect") = " FKHFSF "

I thought that these variables would be the exclusive use of one connected user/connection. But it looks like that in a multiuser enviroment some
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)

Ton


Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bonj | last post by:
H I've got the following problem - I need to have an aspx page with two frames, although the question isn't necessarily about the workings of the frames, more session variables... the frames consist...
4
by: Wayne | last post by:
Hi, I'm new to .NET and have a question about the use of static variables vs. session variables in a web form in C#. Instead of using a session variable to hold a string to persist during...
4
by: John Kraft | last post by:
Hi all, My question is more of a phylisophical one here, but I am wondering what the difference is (effectively and performance wise) between using a shared variable/static variable and using a...
3
by: ton | last post by:
Hi, I keep several variables in a statevalue like: Dim session As SessionState.HttpSessionState = System.Web.HttpContext.Current.Session session("connect") = " FKHFSF " I thought that these...
2
by: Srinivasa Raghavan | last post by:
Hi, I have a web site which uses FormAuthentication. After the logging in, i store the user credentials in a Session Variable which is not updated any where in the website. After certain point it...
3
by: Philip Tepedino | last post by:
I'm having an odd problem. My website's session state is getting shared between users! This problem only happens when a user tries to access the site from inside our corporate LAN. The user,...
3
by: Grigs | last post by:
Hello, I have a web service that reads its web.config file to connect to an Oracle database. There are a number of methods in this socalled BACKBONE that either send inforomation to or from the...
2
by: Markus Prediger | last post by:
Hi NG, I have an asp.net project that uses an vb6 com object for some database-manipulation (I cannot rewrite it in .net, sorry, its not my decision). I want it to be instanciated seperately...
9
by: Randy | last post by:
Hello, I'm having a strange problem. I've got a .NET web app which uses Session variables. Sometime, not all the time, they get cross threaded...that is...one user will have another user's Session...
3
by: Tarren | last post by:
Hi: In Visual Basic is there the equivalent of a Session variable where I can store variables in memory while the executable is running? I have been coding ASP .NET for some time, but am new to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.