473,666 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1670
> 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
1372
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. I had the same code in my IIS5 web and I don't remember it counting me each time I came in. I know it did if I would close all IE and open a new one but not if I had one opened then opened a new one. Is there something diferent
1
1609
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"?> <CategoryList> <Category> <MainCategory ID="3">XML</MainCategory>
1
3890
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 = New DirectoryEntry("LDAP://domain") Dim mySearcher As New DirectorySearcher(enTry) Dim resEnt As SearchResult mySearcher.Filter = ("(objectClass=*)") mySearcher.SearchScope = SearchScope.Subtree
10
1512
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 lived threads that get a request and return a reply and end. Can the main thread tell me how many connection threads are currently running at any given time? I'd like to have a label on the main form to show how many connections the server is...
2
5959
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 use the System.DirectoryServices.ActiveDirectory namespace. I don't even know if this is the right way to go as I can't seem to find anything in that namespace that would help me query active directory for names. I can't use an LDAP query...
4
2183
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
1088
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 application variable count and session_end event I am decreasing the count. But problem is when user closes browser no event will be fired. So I am not able to reduce the application variable count. It will show the old result. Do you know any method to...
8
3739
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 bool field to the table and set each user to 1 if they are logged in, and 0 if they are not logged in? *** Sent via Developersdex http://www.developersdex.com ***
2
1545
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 ? Thanks in advance.
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.