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

Re: How to enumerate sessions? by Nicholas

Nicholas
Fri Jan 09 09:12:59 CST 2004

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]
- mvp@spam.guard.caspershouse.com

"Arsen Vladimirskiy" <arsen@emergency24.com> wrote in message
news:O16keBs1DHA.2412@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
>
>



Re: How to enumerate sessions? by David

David
Fri Jan 09 09:31:54 CST 2004


"Arsen Vladimirskiy" <arsen@emergency24.com> wrote in message
news:O16keBs1DHA.2412@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