473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Counting active users

Hi,

I'm developing an online shopping cart. Usually the site
administrator modifies products etc in the "Store". I want
a mechanism for the administrator such that he should be
able to view or at-least count the customers or visitors
in my "Store" (only in store), users of the other sections
should not be counted.

Whenever a user in my store signs out or closes the
browser (not properly sign out) or even leaves the "Store"
the count should decrement. Any solutions.

Note: For cart, I'm creating a session whenever a visitor
adds an item from the store. The session is destroyed when
visitor properly signs out.

Regards

Sajid
Jul 19 '05 #1
1 1658
> Whenever a user in my store signs out or closes the
browser (not properly sign out) or even leaves the "Store"
the count should decrement. Any solutions.

Depending on how you're storing it, the count won't decrement immediately
because no event is raised when the user closes their browser or moves to
another site. You can wait for the session.timeout event (though
Session_OnEnd is not reliable; see ) or you can have a job that cleans up
sessions it believes are idle (which also needs to wait for session.timeout
to be accurate and not kill someone's session when they were just reading a
page for 10 minutes). See here for ideas: http://www.aspfaq.com/2491

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mike D | last post by:
I have this line of code in my global.asa Application("Active") = Application("Active") + 1 I open alot of new IE windows and I have my homepage set to my intranet that contains the above code....
1
by: Sonu Kapoor | last post by:
Hi guys, I know that counting of nodes is not a big deal. But I need to do something where I cant get any solution. Here is how my xml looks like. <?xml version="1.0" encoding="utf-8"?>...
1
by: tangus via DotNetMonster.com | last post by:
Hello all, I'm really struggling with getting some Active Directory code to work in ASP.NET. Can you please provide assistance? I am executing the following code: Dim enTry As DirectoryEntry =...
10
by: cj | last post by:
I'm writing a TCP/IP server app that will have many simultaneous connections. The main thread listens for new connections and starts a thread to handle each requested connection. These are short...
2
by: Jim in Arizona | last post by:
My goal, somehow, is to populate a dropdownlist with all the user names in active directory. I don't even know where to begin, really. I added a reference to System.DirectoryServices so I could...
4
by: kpg | last post by:
Hi all, Ah yes, the age old counting session question. sessionstate mode="InProc" timeout="5" Sub Application_Start() Application("ConcurrentUsers") = 0
1
by: navaneethkn | last post by:
Hello I need to count how many users are active in the website. Do you have any idea on this. I did using application variable. On session_start event in global.asax I am incrementing the...
8
by: Mike P | last post by:
What would be the best way of counting the number of users who are currently logged on to a website? I am making the users login against a database of valid users. Would the best way be to add a...
2
by: pradeep | last post by:
Hello all, There is system. Users are logging , working and logout. Suppose, 5 users are working and Admin wants to find out no. of users working on system with their name ? How to find this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.