Apache
  Home arrow Apache arrow Page 5 - ASP: Active Sessions, Active Logins and To...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
VeriSign Whitepapers 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
APACHE

ASP: Active Sessions, Active Logins and Total Site Hits
By: Softwaremaker
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2003-03-03

    Table of Contents:
  • ASP: Active Sessions, Active Logins and Total Site Hits
  • Problem Solved
  • Writing The Code
  • Active Logins
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    ASP: Active Sessions, Active Logins and Total Site Hits - Conclusion


    (Page 5 of 5 )

    These are just my way of implementing a counter to keep track of Active Logins on my site. It may not be the most efficient method around so if any of you fellow developers have a better way to implement this, please do not hesitate to email me (itnews@Softwaremaker.Net) and let me know.

    My website http://www.Softwaremaker.Net has an implementation of this script. Try it out by refreshing my homepage right away, then refreshing it after 10 minutes when your session times out or try to open up a new browser window to start a new session to see the active sessions and the number of site hits increment then wait for it to time out and watch the active session count decrement.

    There is also a counter to keep track the number of active Logins at the current moment so try logging in and watch the active Login Counter increment and then do two different logouts to see the Active Login Counter decrement, one by manually terminating the session by clicking the Logout button and the other by waiting for the session to end after 10 minutes.

    As you can see, once you understand the concept of the Application and the Session Object, we can easily manipulate the variables accordingly to what we want. But be careful, the perfect software engineering concept is often a Holy Grail at best. Overuse of the Application object can have undesirable effects on your web application as it will be harder to keep track of what each application variable is storing. It will also result in slower loading and memory leakage if unused application objects are not cleared properly.

    Enter ASP.NET and the Garbage Collector to solve these problems. The GLOBAL.ASA file has its own quirks too. Each time the web server is shut down, the GLOBAL.ASA file has to be re-copied back up to its remote location or your site will fail to initialize. But these are topics to be discussed on another day in another forum.

    Enjoy.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    APACHE ARTICLES

    - Programmatically Manipulating Microsoft Exce...
    - Installing PHP under Windows
    - Compressing Web Content with mod_gzip and mo...
    - Compressing Web Output Using mod_deflate and...
    - Setting Up Apache 2.0.45 to Parse PHP Pages
    - Custom Error 404 Documents with PHP
    - Using Apache and PHP on Mac OS X
    - ASP: Active Sessions, Active Logins and Tota...
    - Working With Oracle on Windows: Part 1
    - The Quick-n-Dirty Guide to Setting Up Apache...
    - Installing Apache With SSL: The Complete Gui...
    - 7 Powerful .htaccess Customization Tips
    - Trap And Get Notified: A Practical Solution ...
    - One Way To Use Server Side Includes
    - Using ForceType For Nicer Page URLs







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway