No of users ?

P

PW

Hi,

I'm hosting a couple of ASP applications on my server. How can I tell the
number of users currently logged on, and can I get any details about them ?

Thanks,
PW
 
E

Egbert Nierop \(MVP for IIS\)

PW said:
Hi,

I'm hosting a couple of ASP applications on my server. How can I tell the
number of users currently logged on, and can I get any details about them
?

Depends on how you authenticate. Do you have them anonymously access the
site? Or do you use a database login? Or do you use clear text
authentication?
 
V

vicky

Hi,

You can keep track of your users by creating an application level
variable and incrementing it whenever a user calls the page.Get user's
session id and check for it when the page is called, if its different
then increment the variable's value. then you can keep that value in a
text file or in database.

Its so simple. right :)
 
B

Bob Barrows [MVP]

vicky said:
Hi,

You can keep track of your users by creating an application level
variable and incrementing it whenever a user calls the page.Get user's
session id and check for it when the page is called, if its different
then increment the variable's value. then you can keep that value in a
text file or in database.

Its so simple. right :)

wrong
 
D

Dave Anderson

vicky said:
Can you tell me why is it wrong???

Because sessions are stateless.

Since they are stateless, you have no idea when a user leaves the site, so
there is no realistic way to ACCURATELY measure the number of users
"currently logged in".
 
B

Bob Barrows [MVP]

vicky said:
Hi Bob,

Can you tell me why is it wrong???

Vicky

:)

The article I cited in my first reply explains it. Dave did it in fewer
words, but that's the point that makes it harder than simply storing the
data in application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,052
Members
48,769
Latest member
Clifft

Latest Threads

Top