473,387 Members | 1,669 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,387 software developers and data experts.

How to enumerate sessions?

Hello,

Is there a way to enumerate (or iterate through) all the current sessions of
an ASP.NET application?

For example, I want to write a file current-session.aspx that will tell me
the number of currently connected sessions and will also show me that
information about the data that is stored in all those sessions?

Thanks,
Arsen
Nov 15 '05 #1
2 1838
Arsen,

I think that if you want to access this information, you will have to
use a performance counter (if it exists) in ASP.NET. However, if you are
^IN^ ASP.NET, then I doubt you will be able to get any information out of
the other sessions, as that would constitute a security risk.

If you just need raw numbers on the number of sessions, then check the
ASP.NET performance counters. There should be something there.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Arsen Vladimirskiy" <ar***@emergency24.com> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl...
Hello,

Is there a way to enumerate (or iterate through) all the current sessions of an ASP.NET application?

For example, I want to write a file current-session.aspx that will tell me
the number of currently connected sessions and will also show me that
information about the data that is stored in all those sessions?

Thanks,
Arsen

Nov 15 '05 #2

"Arsen Vladimirskiy" <ar***@emergency24.com> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl...
Hello,

Is there a way to enumerate (or iterate through) all the current sessions of an ASP.NET application?

For example, I want to write a file current-session.aspx that will tell me
the number of currently connected sessions and will also show me that
information about the data that is stored in all those sessions?

In your Global.asax, each time a session starts, add that session to a
global list. When it it ends, remove it.

David
Nov 15 '05 #3

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

Similar topics

2
by: Moses M | last post by:
I am new to C#! I need to enumerate TS sessions (including sessions running in non-application mode) using a C# application. Can this be done using a "TS-WMI" provider? Any input will be...
6
by: Rich Crusco via DotNetMonster.com | last post by:
I am looking for a way to convert the following vbs script to c# Const ADS_SECURE_AUTHENTICATION = 1 strADMIN = "adminaccount" strPASSWORD = "password" strUSER = "useraccount" Set dso =...
2
by: Arsen Vladimirskiy | last post by:
Hello, Is there a way to enumerate (or iterate through) all the current sessions of an ASP.NET application? For example, I want to write a file current-session.aspx that will tell me the...
5
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. ...
1
by: smichr | last post by:
I see that there is a thread of a similar topic that was posted recently ( enumerate with a start index ) but thought I would start a new thread since what I am suggesting is a little different. ...
6
by: Gregory Petrosyan | last post by:
Hello! I have a question for the developer of enumerate(). Consider the following code: for x,y in coords(dots): print x, y When I want to iterate over enumerated sequence I expect this to...
2
by: eight02645999 | last post by:
hi, i am using python 2.1. Can i use the code below to simulate the enumerate() function in 2.3? If not, how to simulate in 2.1? thanks from __future__ import generators def...
21
by: James Stroud | last post by:
I think that it would be handy for enumerate to behave as such: def enumerate(itrbl, start=0, step=1): i = start for it in itrbl: yield (i, it) i += step This allows much more flexibility...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.