UserConcurrency

From: eolss (Store2003_at_hotmail.com)
Date: 11/30/03

  • Next message: Paul Glavich: "Re: Error accessing Registry from Windows app"
    Date: Sat, 29 Nov 2003 22:24:01 -0800
    
    

    How can I count the number of online users on my site? I
    have implemented my application as follows. Whenever a
    user logs in, I increment the count field in my database
    by 1 in Session_Begin and on Session_End I decrement it by
    1.Though the code works fine in normal circumstances, I
    noticed a few anamolies:
    1. If the user refreshes his browser, the Session_Begin is
    called again and the counter is incremented again. To
    overcome this, I used cookies. The first time the user
    logs in, I create the cookie. When the user refreshes his
    browser, it checks if the cookie exists, if it doesnt it
    treats it as a new request and updates the counter
    accordingly.
    2. The problem arises on log out. Whenever the user
    refreshes his browser, Session_End is called that many
    times, and my counter is decremented more than once. How
    can I get Session_End to run only once for each instance
    of the browser?
    3. I'm using Forms Authentication and on Session_End I
    want to call FormsAuthentication.SignOut since the user
    can still access the pages after the session ends,causing
    a new session to be started. But this function does not
    work in Session_End.


  • Next message: Paul Glavich: "Re: Error accessing Registry from Windows app"

    Relevant Pages

    • Re: Creating "remember me" functionality
      ... the session data is erased. ... When someone logs into your website, you need to use setcookie on the next ... This makes it a set size charfor a database. ... $_Cookie for the required fields. ...
      (alt.php)
    • Re: Exchange 2003 OMA problem
      ... Are you trying to access this OMA via the WAPBROWSER (I assume so from the ... logs and the t610 spec)? ... and suggest that you look at WAP browser for the desktop while you work this ... > Using a browser I can connect fine, but using a mobile phone I get ...
      (microsoft.public.exchange.connectivity)
    • Re: XP home network
      ... I'm going to bet that you have a browser conflict here. ... logs from ... workstation", from each computer, so we can diagnose the problem. ... But the binding of NetBT to the OptusNet adapter, on Pats, could be a problem. ...
      (microsoft.public.windowsxp.network_web)
    • Cross-domain cookie synchronisation
      ... I have an authentication system which, at login and performed using ... The cookie expires either at midnight or - as it's a session ... webapps within the same domain, as all webapps can see the domain ... John now logs into Site 1 from the same ...
      (comp.lang.java.programmer)
    • Re: Cookie Cached problem
      ... All the pages DO use the same cookie. ... In the first section the user logs in and hits some pages then logs out. ... You see the old "LastAccess" ...
      (microsoft.public.inetserver.iis.security)