How to enumerate sessions?

Discussion in 'ASP .Net' started by Arsen Vladimirskiy, Jan 9, 2004.

  1. 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
     
    Arsen Vladimirskiy, Jan 9, 2004
    #1
    1. Advertisements

  2. 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], Jan 9, 2004
    #2
    1. Advertisements

  3. Arsen Vladimirskiy

    David Browne Guest


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

    David
     
    David Browne, Jan 9, 2004
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.