473,804 Members | 2,252 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Possible to read active session variables?

When users log into my website, they're given session variables:
Session("userid ") = [whatever their name is]

Let's say I have 7 users logged in. Is there a way to somehow loop
through all the sessions and return all the values of Session("userid ")
that are open?

Basically, if 7 users are logged in, I want to be able to see which ones
have sessions open.

--
[ Sugapablo ]
[ http://www.sugapablo.net <--personal | http://www.sugapablo.com <--music ]
[ http://www.2ra.org <--political | http://www.subuse.net <--discuss ]

Jul 22 '05 #1
4 1720
Hi Sugapablo,

Unfortunately, no, you cannot list all the values in all your sessions or
anything like that. But, you can get a count of sessions. Take a look
here. http://www.aspfaq.com/show.asp?id=2095 (and notice link at the
bottom).

Ray at work

"Sugapablo" <ru**@REMOVEsug apablo.com> wrote in message
news:pa******** *************** *****@REMOVEsug apablo.com...
When users log into my website, they're given session variables:
Session("userid ") = [whatever their name is]

Let's say I have 7 users logged in. Is there a way to somehow loop
through all the sessions and return all the values of Session("userid ")
that are open?

Basically, if 7 users are logged in, I want to be able to see which ones
have sessions open.

--
[ ] [ http://www.sugapablo.net <--personal | http://www.sugapablo.com <--music ] [ http://www.2ra.org <--political | http://www.subuse.net <--discuss ]

Jul 22 '05 #2
what you want to do is possible.."sort of" just complicated because you can
not loop through the sessions like that

you would basically need to (for each session) store the info in applciation
variables as well
(ideally the less info the better.. like the username and the last time they
accesses anything are about all you should store)

you'd also want to recycle it and only store like 50 or so users at any one
time

then you can grab that info anytime you like from the application variable

AGAIN.. very complicated.. yet so very simple once it is all working..
Very difficult to explain and if done right not a performance/memory
problem.

systems like aspprotect v7 do something liek this to allow you to view
information on who is logged in and also what page they accessed last
I have looked the code over a few times and though I basically see what is
going on it is pretty complicated to grasp

www.aspprotect.com

"Sugapablo" <ru**@REMOVEsug apablo.com> wrote in message
news:pa******** *************** *****@REMOVEsug apablo.com...
When users log into my website, they're given session variables:
Session("userid ") = [whatever their name is]

Let's say I have 7 users logged in. Is there a way to somehow loop
through all the sessions and return all the values of Session("userid ")
that are open?

Basically, if 7 users are logged in, I want to be able to see which ones
have sessions open.

--
[
]
[ http://www.sugapablo.net <--personal | http://www.sugapablo.com
<--music ]
[ http://www.2ra.org <--political | http://www.subuse.net
<--discuss ]

Jul 22 '05 #3
ohh, and there are lots of other little issues I forgot to mention as well..
like removing users from the application variables as they log off or their
session ends

etc etc
"Kyle Peterson" <kp*****@hotmai l.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
what you want to do is possible.."sort of" just complicated because you
can not loop through the sessions like that

you would basically need to (for each session) store the info in
applciation variables as well
(ideally the less info the better.. like the username and the last time
they accesses anything are about all you should store)

you'd also want to recycle it and only store like 50 or so users at any
one time

then you can grab that info anytime you like from the application variable

AGAIN.. very complicated.. yet so very simple once it is all working..
Very difficult to explain and if done right not a performance/memory
problem.

systems like aspprotect v7 do something liek this to allow you to view
information on who is logged in and also what page they accessed last
I have looked the code over a few times and though I basically see what is
going on it is pretty complicated to grasp

www.aspprotect.com

"Sugapablo" <ru**@REMOVEsug apablo.com> wrote in message
news:pa******** *************** *****@REMOVEsug apablo.com...
When users log into my website, they're given session variables:
Session("userid ") = [whatever their name is]

Let's say I have 7 users logged in. Is there a way to somehow loop
through all the sessions and return all the values of Session("userid ")
that are open?

Basically, if 7 users are logged in, I want to be able to see which ones
have sessions open.

--
[ ]
[ http://www.sugapablo.net <--personal | http://www.sugapablo.com
<--music ]
[ http://www.2ra.org <--political | http://www.subuse.net
<--discuss ]


Jul 22 '05 #4
Sugapablo wrote:
Let's say I have 7 users logged in. Is there a way to somehow
loop through all the sessions and return all the values of
Session("userid ") that are open?


If you write your own session management architecture, yes.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #5

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

Similar topics

1
1564
by: Gervin | last post by:
That was the first question. BTW, I am using Windows 2000 Server. Second questions is how do I transfer session variables from one virtual website to another website. Currently I have session variables set in say www.first.com and then I click a link and goto www.second.com. How can I transfer session variables from www.first.com to www.second.com? Both sites are virtual websites and running on the same physical server running Windows...
9
2540
by: | last post by:
Is it possible for a user to enable permanent cookies but disable session cookies.....this seems like a contradition yet this is what I appear to be reading in online articles?
4
1965
by: Bob Stearns | last post by:
Right now, I am attempting to see how many users are "signed on" to my system. Since this is, at best, rather tenuous in a WEB environment, I thought to read the active session variables and see how many sessions there were.
2
4253
by: Chris Hayes | last post by:
Is it possible to iterate through all the active sessions of an ASP.net application? I have this fancy user object (with all kinds of properties) that I set as a session level object on session start and I'd like to be able to find a specific user's session so that I can make modifications to the fancy user object (ie. add a note to the session, or change some properties within it, or even end/kill the session!). So simply put is...
1
4760
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem I have run into I am not sure how to fix, and really not sure what is causing it. Here's what is going on (test server - Windows 2003 Server): I have a page in a folder (under anonymous authentication in IIS6) that has a link on it that...
5
2452
by: Oleg Ogurok | last post by:
Hi all, Is there a way to read other people's session variables? I understand it makes sense that session state is on per-user basis, but still... Is there a way to get a collection of all current HttpSessionState objects on the server, or at least get a reference to a HttpSessionState objects by session ID ? Thanks.
5
3872
by: Gaetan | last post by:
I would like to guarantee that only one session at a time can request exclusive access to an object stored in Application. The ownership of the object must last throughout multiple HTTP requests. However the session might timeout. When a session ask ownership of the object, I need to determine whether the session that currently own it is still active. I need to enumerate the sessions for the current application to determine whether to...
9
2310
by: Laurent Bugnion | last post by:
Hi, I am wondering what is the best way to find out which ASP.NET sessions are still active. Here is the reason: I have a custom control which can upload files. It saves the files in a folder named after the SessionID. At Session_End, I do some cleanup and delete the "session folder". However, if the PC is rebooted before the session times out, the clean up never happens. So what I wanted to do isL: In my CleanUp method, check all...
0
7194
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along the way. First, deep linking is not something that a completely AJAX web site should be able to do by it's very nature of everything being on one page basically. So how can a person deep link to something that is on one page? This question...
0
9714
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10599
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10090
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9173
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5531
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3832
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.