473,796 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

is it possible to iterate through all the active sessions of an ASP.net application

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 there any way to track down a specific session? And if so
how (preferrably in a way that can be coded in ASP.NET)?

It would be kind of nice to have a page the listed all the active sessions
in the ASP.NET application... Perhaps my dreams are greater than what the
technology allows at this point...

Any help or insight is greatly appreciated.

Chris


Nov 17 '05 #1
2 4252
You would have to have an Application level object, store references to each
of the session objects. So something like an arraylist, to which you add
each session object every time a new session is created. Be sure to delete
the object from you collection once the session expires.

"Chris Hayes" <ch***@carrotin k.com> wrote in message
news:u4******** ******@TK2MSFTN GP11.phx.gbl...
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 there any way to track down a specific session? And if so
how (preferrably in a way that can be coded in ASP.NET)?

It would be kind of nice to have a page the listed all the active sessions
in the ASP.NET application... Perhaps my dreams are greater than what the
technology allows at this point...

Any help or insight is greatly appreciated.

Chris

Nov 17 '05 #2
I was afraid that was going to be the solution...

Thanks,

Chris

"Marina" <zl*******@nosp am.hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
You would have to have an Application level object, store references to each of the session objects. So something like an arraylist, to which you add
each session object every time a new session is created. Be sure to delete
the object from you collection once the session expires.

"Chris Hayes" <ch***@carrotin k.com> wrote in message
news:u4******** ******@TK2MSFTN GP11.phx.gbl...
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 there any way to track down a specific session? And if so how (preferrably in a way that can be coded in ASP.NET)?

It would be kind of nice to have a page the listed all the active sessions in the ASP.NET application... Perhaps my dreams are greater than what the technology allows at this point...

Any help or insight is greatly appreciated.

Chris


Nov 17 '05 #3

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

Similar topics

4
1718
by: Sugapablo | last post by:
When users log into my website, they're given session variables: Session("userid") = 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.
2
2149
by: Marcio Kleemann | last post by:
Is there a way to get a list of the session id's for all currently active sessions for the application? Thanks
7
3866
by: Christina N | last post by:
I want to output a list of all active SessionID's and their last time of activity. Can I loop through the active sessions and create a list like that? I use ASP.Net (VB.Net) Best regards, Christina
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
2309
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...
3
3877
by: Atul | last post by:
Hi, I am running .NET Framework 2.0 on windows XP SP2. I am stuck in a situation where I need to find out a list of all active sessions running in IIS for a web application. I know that .NET 2.0 has introduced a new class that facilitate this task very easily, somehow couldnt recall its name. Any help would be highly appreciated.
2
3558
by: JoeSep | last post by:
Hello, I know that when the SessionState is set to SQL Server (ASP.NET 1.1) these counters in PerfMon are not valued: - Sessions Abandoned - Sessions Active - Sessions Timed Out - Sessions Total Is there another way to get these counters (especially "Sessions Active") when the SessionState is set to SQL Server? Thanks in advance!
2
12152
by: Krish........... | last post by:
Hi all, How to find out no of active sessions (at a time) in the web server.. I dont think handling Session_start and Session_end events are useful for this. Is there any way to find all current active sessions by using Application object ? Thanx, Krish....
6
3703
by: bill | last post by:
I have been "Googling" for about an hour and am turning up squat! I just started receiving this error when trying to log into a MS Access database from a vb .net web application. Recycling IIS seems to temporarily fix the problem, but I am at a loss on how to view the total # of "active" sessions, etc... any ideas or suggestions would be greatly appreciated! Could not start session. Too many sessions already active. Description: An...
0
10455
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
10228
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10173
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10006
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
9052
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
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2925
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.