Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   If User connected to IIS (http://www.velocityreviews.com/forums/t799761-if-user-connected-to-iis.html)

Prabhat 10-07-2005 05:06 AM

If User connected to IIS
 
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



McKirahan 10-07-2005 05:12 AM

Re: If User connected to IIS
 
"Prabhat" <not_a_email@hotmail.com> wrote in message
news:O1pZrzvyFHA.464@TK2MSFTNGP15.phx.gbl...
> 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."



Prabhat 10-07-2005 05:28 AM

Re: If User connected to IIS
 
"McKirahan" <News@McKirahan.com> wrote in message
news:JbGdnUqGROtdntveRVn-qQ@comcast.com...
> 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



Kristofer Gafvert [MVP] 10-07-2005 07:08 AM

Re: If User connected to IIS
 
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


Evertjan. 10-07-2005 07:40 AM

Re: If User connected to IIS
 
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)


Prabhat 10-07-2005 08:09 AM

Re: If User connected to IIS
 
"Kristofer Gafvert [MVP]" <kgafvert@NEWSilopia.com> wrote in message
news:xn0e87f9h6y9i9e00g@news.microsoft.com...
> 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



Kristofer Gafvert [MVP] 10-07-2005 08:14 AM

Re: If User connected to IIS
 
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.


Evertjan. 10-07-2005 08:21 AM

Re: If User connected to IIS
 
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)


Kristofer Gafvert [MVP] 10-07-2005 09:08 AM

Re: If User connected to IIS
 
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/Transmi...ntrol_Protocol

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


[1] http://www.w3.org/Protocols/rfc2616/...sec8.html#sec8
[2]
http://www.microsoft.com/technet/pro...418dbfe42.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.


Evertjan. 10-07-2005 01:15 PM

Re: If User connected to IIS
 
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)



All times are GMT. The time now is 02:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.