IIS number of connection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I wan't to know how many user are connected in my web site. But i didn't
find any methode in c# about how show IIS statitics. Maby with WMI provider?

Thanks for your help.

Regards

Dragan
 
You can do this a lot easier with ASP.NET. Whenever a new user Session is
begun, in Session_Start, you can increment a static counter variable. On
Session_End, decrement the variable. If it is in Global.asax, then you can
refer to it anywhere in your app as "Global.CurrentUserCount".

Peter
 
You can do this a lot easier with ASP.NET. Whenever a new user Session is
begun, in Session_Start, you can increment a static counter variable. On
Session_End, decrement the variable. If it is in Global.asax, then you can
refer to it anywhere in your app as "Global.CurrentUserCount".
There are situations where the no event is fired when the session
ends. I believe this is the case when a session is shared across
several machines in a web farm. In 2.0 the MembershipProvider type has
a method named GetNumberOfUsersOnline.

regards
A.G.
 
| Hello,
|
| I wan't to know how many user are connected in my web site. But i didn't
| find any methode in c# about how show IIS statitics. Maby with WMI
provider?
|
| Thanks for your help.
|
| Regards
|
| Dragan
|

That's what the Performance counters are for. The 'Web Service' object
maintains a 'Total Connections' counter per site and a total count.


Willy.
 

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

Back
Top