monitor # active ASP Sessions?

Results 1 to 8 of 8

Thread: monitor # active ASP Sessions?

  1. #1
    keith5g Guest

    Default monitor # active ASP Sessions?

    Is there a way to monitor the number of active ASP sessions? We have a login based site and we&#039d like to monitor login activity as well as currently active sessions (as opposed to dead sessions, since a session can still exist if the the Session_onEnd function isn&#039t called because the user aborts).<BR><BR>IIS is already recording this information anyway to do its own session monitoring. Is it available?<BR><BR>We are not looking for:<BR>* a database solution (record logins and all activity into the database). since we need to know how long a session has been inactive, it&#039s too work-intensive to program a database call on every page that says "this person is still active".<BR><BR>* number of connections to the web server, as this changes from second to second and does not accurately reflect the number of sessions.

  2. #2
    Join Date
    Dec 1969

    Default RE: monitor # active ASP Sessions?

    you could place something in the session_onstart and session_onend that adds one to a file. then use the session_onend to subtract from that file.<BR><BR>so when someone starts a session. you read the value in the file. and add 1 to it. when they leave. just take 1 off it.

  3. #3
    keith5g Guest

    Default nope

    I don&#039t think that the result will accurately reflect the number of active sessions. If someone closes the browser, then the session is left hanging, until it times out.<BR><BR>We&#039ll need to know the time of the last action performed by the user.<BR><BR>I would imagine IIS knows this and records each time the Session object is used, because each time it is used the session timeout resets and starts counting down again. If the session object is not used within the specified timeout, then the session is forced to end (Session_onEnd is called).

  4. #4
    Join Date
    Dec 1969

    Default RE: monitor # active ASP Sessions?

    This is going to be hard. As Session_onEnd event may not always get triggered. Actually you can try something like :<BR><BR>Set a session variable like Session("beenhome") ="y" in session_onstart . Then include in every page "include ifle" which will have code as =&#062;<BR><BR>include file : somefile.asp will have:=&#062;<BR><BR>&#060;% if Session("beenhome") = "" then<BR> Response.Redirect "/home.asp" <BR> end if %&#062;<BR><BR>regards<BR>Pallavi

  5. #5
    keith5g Guest

    Default nope again

    That won&#039t help, but thanks. I guess what I need is a way to tap into the session information that IIS stores for each user to determine the number of sessions active and the last access time for each.

  6. #6
    Darren D. Guest

    Default RE: nope again

    What about the "Sessions Current" counter in Performance Monitor in NT/2000?

  7. #7
    keith5g Guest

    Default maybe...

    Maybe, but I can&#039t find the "Sessions Current" counter. I&#039d also need to know the last access times for each session.<BR><BR>Thanks

  8. #8
    Darren D. Guest

    Default RE: maybe...

    (On the web server)<BR><BR>Performance Monitor &#062;&#062; Add Counter &#062; Active Server Pages (Perfmon Object) &#062; Sessions Current (Also Total, Timedout, etc.)<BR><BR>Dunno about the last access though.<BR><BR>I&#039m running Windows 2000 with IIS5 so it might not be present in the NT4/IIS4 configuration (although I&#039m pretty sure it&#039s there).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts