473,698 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application and user count...

Hi,

I want to show number of active users (login users) on my web page.
Creating the number of activate users is easy. I increased an
application variable (Application("n umOfUsers")) by one when a user is
logged in. But a problem comes up when decreasing this application
variable. I made this decramention in session_end but for a long time
there is no change on the value of application variable. I think this
problem is caused by session life property... How can provide the
application variable to decrease immediately when a user leaves the
site?
Nov 18 '05 #1
1 2052
Consider user leaves the site in two ways:
1. As soon as server finishes with every response.
2. Clicks logout button.

Since not all of them will choose 2, you should create a mechanism to
control a list of logged in users with a timeout for the records. For
example (if you use a DB table for users, not Windows accounts), you could
create a column in the table for the last login date and time, update it
every login and create a view with the criteria to compare last login date
and time with the current date and time minus 5-10 minutes (you decide).

For the Windows accounts, almost the same if you could create a table
somewhere, even as the virtual table without an actual DB and keep that
table as the application variable, ar saved as XML file.

"Bar??" <ae*******@yaho o.com> wrote in message
news:e3******** *************** ***@posting.goo gle.com...
Hi,

I want to show number of active users (login users) on my web page.
Creating the number of activate users is easy. I increased an
application variable (Application("n umOfUsers")) by one when a user is
logged in. But a problem comes up when decreasing this application
variable. I made this decramention in session_end but for a long time
there is no change on the value of application variable. I think this
problem is caused by session life property... How can provide the
application variable to decrease immediately when a user leaves the
site?

Nov 18 '05 #2

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

Similar topics

3
2760
by: Luca Mariano | last post by:
Hi people, I'm developing the first PHP Application Server. It can run PHP classes that extends the HttpPhplet interface with the same methods of javax.http.HttpServlet. The phplet are like servlet, they runs into a container and implements init(), service(), destroy() methods. It's a brand new concept for PHP, but we have a solid experience with java servlets and the idea behind this (a web application with a servlet complete lifecycle)...
5
3842
by: Mark Fisher | last post by:
I have a Java desktop GUI application that the user can run multiple times. In order to keep one instance of the application distinct from another, I'd like to put the instance number of the application in the title bar. For example, the user starts the application, and the title bar says "Control Panel". The user starts another instance of the application, and it knows that one instance is already running, so the title bar of the...
9
1929
by: Art | last post by:
Can I update Application("SomeVariableName") on server A in response to user's action on server B? There is no problem in updating the same variable on server B, of course, but we would like both variables to be in sync since users can view the value stored on arbitrary server. So far I have tried server.execute and server.transer to execute script updating Application("SomeVariableName") value on server A in response to user's action on...
1
328
by: Al Murphy | last post by:
Folks, I'm trying to write a little VB.NET Web image-essay application. You know the ones - a "next/previous" button etc... However due to the fact that I am new to VB.NET I have bugs. Could you a look at the code below and tell me where I'm going wrong. Suggestions/commetns/code samples much appreciated. Thanks Al
1
5493
by: Alpha | last post by:
I have a Window based application that shows up still running in the task manager when I close it. It reaches the "this.close" statement and then it stops at the "}" at the section of the following code after the "Application.Run(new VMSMain());": static void Main() { Application.Run(new VMSMain()); }
6
2816
by: KS | last post by:
I have made a WebForm with log ON/OFF off users. There is a label that shows the total count off users logged on stored in Application("UserCount") It works fine if the users logs out WITH THE LOG-OUT BUTTON, but what if a user "logs out" by closing with the X-button ? If I count down the Application("UserCount") in UNLOAD or DISPOSE I get a spoky reaction in Application("UserCount") - it just counts wrong !
3
1555
by: Mike Johnson | last post by:
I have the following code in form1 and when the application starts this sub is called to check for a path if not found a message box is displayed and then gives the user an option to end the application but when this option is selected the application does not end but continues to the next line of code which tries to setup a filewatcher with the path which does not exist, which then gives an error. please help. Public Sub Check_For_Dir()...
2
1343
by: sudhaoncyberworld | last post by:
Hi Techies, I have created Setup & Deployment project and installing a windows application from that. Now i want to restrict the user to install my application only upto 3 times. After that it should prompt to the user to download again from the site. Can anyone guide me in this.
8
1408
by: Anthony Smith | last post by:
I am looking into building a web application and one of the things I want to do is to make sure the user is logged in. I know I can do this by checking the session for a user object or something similar. Is there a best practice for this. Currently what I do is have each page include a check session include file.
1
3749
by: Aegixx | last post by:
Ok, extremely wierd situation here: (I'll post the code below, after the explanation) I've got a Windows application (.NET 3.5) that has a single Form with a DataGridView embedded. The user presses a button to do a SQL query (fill a DataSet). Before firing the query, I disable the grid/buttons and turn on UseWaitCursor. After it completes, I re-enable the grid/ buttons, refresh the dataset, then turn off the UseWaitCursor. If I...
0
8671
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8598
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
9152
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9016
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
8887
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
7709
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...
0
5858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2321
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.