If User connected to IIS

Discussion in 'ASP General' started by Prabhat, Oct 7, 2005.

  1. Prabhat

    Prabhat Guest

    Hi All,

    Is there a way that I can know if any user connected to any of my website
    (or any specific website) in IIS 5? I wanted to know this before I restart
    the Service.

    Thanks
    Prabhat
     
    Prabhat, Oct 7, 2005
    #1
    1. Advertising

  2. Prabhat

    McKirahan Guest

    "Prabhat" <> wrote in message
    news:...
    > Hi All,
    >
    > Is there a way that I can know if any user connected to any of my website
    > (or any specific website) in IIS 5? I wanted to know this before I restart
    > the Service.
    >
    > Thanks
    > Prabhat


    Google is your friend.

    Counting Active Users
    http://www.asp101.com/resources/active_users.asp
    "There are 28 users currently on this site!"

    GLOBAL.ASA
    http://www.aspwebpro.com/tutorials/asp/globalasa.asp
    "For example, we use the global.asa file on this website
    to display the number of Active Users on our site."
     
    McKirahan, Oct 7, 2005
    #2
    1. Advertising

  3. Prabhat

    Prabhat Guest

    "McKirahan" <> wrote in message
    news:...
    > Google is your friend.
    >
    > Counting Active Users
    > http://www.asp101.com/resources/active_users.asp
    > "There are 28 users currently on this site!"
    >
    > GLOBAL.ASA
    > http://www.aspwebpro.com/tutorials/asp/globalasa.asp
    > "For example, we use the global.asa file on this website
    > to display the number of Active Users on our site."
    >

    Hi McKirahan,

    Thanks for the reply, But I know that we can do that in Global.asa using
    Application variable. I am looking for is there some thing IIS built in that
    will show the active users / activity ?

    (Suppose there is one website that has not yet implenting Active user count
    logic in global.asa and the Web Admin want to restart the Service after the
    mid night and wanted to know if there are any active user for the Site?)

    Thanks
    Prabhat
     
    Prabhat, Oct 7, 2005
    #3
  4. Hi,

    Yes, you can use performance counters. Check out the Web Service
    performance object. "Current connections" will show you if there are any
    connections to the webserver.


    --
    Regards,
    Kristofer Gafvert (IIS MVP)
    http://www.gafvert.info/iis/ - IIS Related Info


    Prabhat wrote:

    >Hi All,
    >
    >Is there a way that I can know if any user connected to any of my website
    >(or any specific website) in IIS 5? I wanted to know this before I restart
    >the Service.
    >
    >Thanks
    >Prabhat
     
    Kristofer Gafvert [MVP], Oct 7, 2005
    #4
  5. Prabhat

    Evertjan. Guest

    Kristofer Gafvert [MVP] wrote on 07 okt 2005 in
    microsoft.public.inetserver.asp.general:

    > Yes, you can use performance counters. Check out the Web Service
    > performance object. "Current connections" will show you if there are any
    > connections to the webserver.
    >


    All very nice, but a "connection" exists only during(!!) download.

    If you mean looking if there are still sessions-not-ended
    [session.end-ed, session.abandon-ed or timed out], yes,
    but those users could have switched off their pc's 19 minutes ago.

    The IIS "Current connections" is a misnomer.


    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Oct 7, 2005
    #5
  6. Prabhat

    Prabhat Guest

    "Kristofer Gafvert [MVP]" <> wrote in message
    news:...
    > Hi,
    >
    > Yes, you can use performance counters. Check out the Web Service
    > performance object. "Current connections" will show you if there are any
    > connections to the webserver.
    >
    >
    > --
    > Regards,
    > Kristofer Gafvert (IIS MVP)
    > http://www.gafvert.info/iis/ - IIS Related Info
    >

    Hi Kristofer Gafvert,

    Thanks for that hint. as Evertjan is telling I think "Current anonymous
    users" should work.

    Thanks
    Prabhat
     
    Prabhat, Oct 7, 2005
    #6
  7. I don't think we will ever find a failsafe way to find out if there is
    someone browsing the website or not since the communication is one-way
    (the client never tells the server it is still online using the website
    until it makes a new request).

    Someone could have switched off their PC, but they could also be reading a
    very long article. Both situations may indicate a connection, or not a
    connection.

    So when restarting the service there is always a risk that someone may be
    affected. The only way to avoid this is to have multiple servers in a
    cluster (and a web application that is coded for this situation).


    --
    Regards,
    Kristofer Gafvert (IIS MVP)
    http://www.gafvert.info/iis/ - IIS Related Info


    Evertjan. wrote:

    >Kristofer Gafvert [MVP] wrote on 07 okt 2005 in
    >microsoft.public.inetserver.asp.general:
    >
    >>Yes, you can use performance counters. Check out the Web Service
    >>performance object. "Current connections" will show you if there are any
    >>connections to the webserver.
    >>

    >
    >All very nice, but a "connection" exists only during(!!) download.
    >
    >If you mean looking if there are still sessions-not-ended
    >[session.end-ed, session.abandon-ed or timed out], yes,
    >but those users could have switched off their pc's 19 minutes ago.
    >
    >The IIS "Current connections" is a misnomer.
     
    Kristofer Gafvert [MVP], Oct 7, 2005
    #7
  8. Prabhat

    Evertjan. Guest

    Kristofer Gafvert [MVP] wrote on 07 okt 2005 in
    microsoft.public.inetserver.asp.general:

    > I don't think we will ever find a failsafe way to find out if there is
    > someone browsing the website or not since the communication is one-way
    > (the client never tells the server it is still online using the
    > website until it makes a new request).
    >
    > Someone could have switched off their PC, but they could also be
    > reading a very long article. Both situations may indicate a
    > connection, or not a connection.


    You are making your own definition of "connection".

    > So when restarting the service there is always a risk that someone may
    > be affected.


    I fully agree.

    > The only way to avoid this is to have multiple servers in
    > a cluster (and a web application that is coded for this situation).


    As we are talking anonimous users,
    I suppose it most often is not worth the trouble.
    However that depends on the site application.

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Oct 7, 2005
    #8
  9. With HTTP Keep-Alives it is a connection until it times out (or closes for
    another reason). Hence someone reading a page (but not actively
    downloading anything) could be "connected".

    So i am not making up my own definition of "connection". The client has an
    inactive connection to the webserver if http keep-alives is enabled and
    used, and the "Current Connections" performance counter object shows this.
    If you do a netstat -an on the webserver you will see that there is an
    established connection between the webserver and client, which also
    indicates that there is a connection.

    HTTP keep-alive is explained in the HTTP RFC (2616)[1], chapter 8. You may
    also want to read about it on the Microsoft website[2].

    HTTP keep-alive is enabled by default on IIS 6.0 and probably also IIS 5.0
    (i didn't have anywhere to check right now).

    For data to transfer between two hosts, first a connection must be
    established (opened). Once a connection has been established, the data can
    be transfered. When the data is sent, the connection is closed. With HTTP
    Keep-alive, the connection is not closed immediately.

    So a connection does not exist _only_ during a download...

    Read "Protocol operation in detail":
    http://en.wikipedia.org/wiki/Transmission_Control_Protocol

    "Transmission Control Protocol"
    http://www.scit.wlv.ac.uk/~jphb/comms/tcp.html


    [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8
    [2]
    http://www.microsoft.com/technet/pr...IIS/ea116535-8eb9-4c80-8b14-b34418dbfe42.mspx


    Bye.


    --
    Regards,
    Kristofer Gafvert (IIS MVP)
    http://www.gafvert.info/iis/ - IIS Related Info


    Evertjan. wrote:

    >Kristofer Gafvert [MVP] wrote on 07 okt 2005 in
    >microsoft.public.inetserver.asp.general:
    >
    >>I don't think we will ever find a failsafe way to find out if there is
    >>someone browsing the website or not since the communication is one-way
    >>(the client never tells the server it is still online using the
    >>website until it makes a new request).
    >>
    >>Someone could have switched off their PC, but they could also be
    >>reading a very long article. Both situations may indicate a
    >>connection, or not a connection.

    >
    >You are making your own definition of "connection".
    >
    >>So when restarting the service there is always a risk that someone may
    >>be affected.

    >
    >I fully agree.
    >
    >>The only way to avoid this is to have multiple servers in
    >>a cluster (and a web application that is coded for this situation).

    >
    >As we are talking anonimous users,
    >I suppose it most often is not worth the trouble.
    >However that depends on the site application.
     
    Kristofer Gafvert [MVP], Oct 7, 2005
    #9
  10. Prabhat

    Evertjan. Guest

    Kristofer Gafvert [MVP] wrote on 07 okt 2005 in
    microsoft.public.inetserver.asp.general:

    > With HTTP Keep-Alives it is a connection until it times out (or closes
    > for another reason). Hence someone reading a page (but not actively
    > downloading anything) could be "connected".
    >
    > So i am not making up my own definition of "connection". The client
    > has an inactive connection to the webserver if http keep-alives is
    > enabled and used, and the "Current Connections" performance counter
    > object shows this. If you do a netstat -an on the webserver you will
    > see that there is an established connection between the webserver and
    > client, which also indicates that there is a connection.


    "if http keep-alives is enabled and used"

    Is this done by my IE, or the majority of anonimous(!!!) users??

    I don't think so, but if so, how can I see that with ASP?


    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Oct 7, 2005
    #10
  11. I have no idea about _your_ IE, since i don't sit in front of your
    computer. I also don't know about the majority of anonymous (i assume that
    is what you mean with "anonimous") users, since i have no idea what client
    browser the majority of anonymous users use (which is also probably
    dependent on the focus of the website).

    IE in general has however had HTTP Keep-Alive enabled by default since 5.0
    (perhaps even in earlier versions but i have no interest in looking for KB
    Articles about this).

    Did you read the URLs i gave you? The question you asked is explained
    there. In general when HTTP 1.1 is used, HTTP keep-alives is used. But
    both the client and/or the server may choose (which is explained in the
    HTTP RFC, the link i gave you in the earlier post) to negotiate.

    Why do you don't think that the majority of anonymous users do _not_
    utilize HTTP keep-alive? What do you base this on?

    Why do you want to know this in your ASP code? It has no meaning at all
    for ASP code.


    --
    Regards,
    Kristofer Gafvert (IIS MVP)
    http://www.gafvert.info/iis/ - IIS Related Info


    Evertjan. wrote:

    >Kristofer Gafvert [MVP] wrote on 07 okt 2005 in
    >microsoft.public.inetserver.asp.general:
    >
    >>With HTTP Keep-Alives it is a connection until it times out (or closes
    >>for another reason). Hence someone reading a page (but not actively
    >>downloading anything) could be "connected".
    >>
    >>So i am not making up my own definition of "connection". The client
    >>has an inactive connection to the webserver if http keep-alives is
    >>enabled and used, and the "Current Connections" performance counter
    >>object shows this. If you do a netstat -an on the webserver you will
    >>see that there is an established connection between the webserver and
    >>client, which also indicates that there is a connection.

    >
    >"if http keep-alives is enabled and used"
    >
    >Is this done by my IE, or the majority of anonimous(!!!) users??
    >
    >I don't think so, but if so, how can I see that with ASP?
     
    Kristofer Gafvert [MVP], Oct 7, 2005
    #11
  12. Prabhat

    Evertjan. Guest

    Kristofer Gafvert [MVP] wrote on 07 okt 2005 in
    microsoft.public.inetserver.asp.general:

    > Why do you want to know this in your ASP code? It has no meaning at all
    > for ASP code.


    OK, then it is OT as far as
    microsoft.public.inetserver.asp.general is concerned.



    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Oct 7, 2005
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2lsdmlh?=

    User connected in a web

    =?Utf-8?B?U2lsdmlh?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    354
    Hans Kesting
    Oct 4, 2004
  2. Robert Scheer

    Verifying the user is connected

    Robert Scheer, Sep 18, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    455
  3. =?Utf-8?B?cmFtYXRh?=
    Replies:
    2
    Views:
    619
    Spam Catcher
    Nov 9, 2005
  4. Guy
    Replies:
    1
    Views:
    688
    Jonck
    Sep 27, 2004
  5. Frances Del Rio

    detecting if a user is connected to the internet...

    Frances Del Rio, Oct 13, 2004, in forum: Javascript
    Replies:
    2
    Views:
    121
Loading...

Share This Page