tags:

views:

301

answers:

2

Hello -

I want to know how many users are connected to the IIS web server at any point on a simple .net page. Is there a way using a native .net class in 3.5 that will tell me this information. I want to create a simple web page that will give me the total number of users/open sessions at a given time.

Currently, I am using Perfmon to get this information however i want to create a simple webpage to retrieve this info

Appreciate your help.

Thanks in advance.

Niraj

+1  A: 

Update 1: To be more simple ( and accurate ), Just use the PerformanceCounter object to get the information I specified below.

Update 0: There is a msdn artical about how to show performance counter in asp.net page ( and more, but that is not important).

You can show the

web service => current connections => total

counter on your page.

Igal Serban
A: 

If you are running IIS7, I know that Microsoft.Web.Administration let's you pull a list of requests for a given worker process. Sadly I've only ran it in our admin scripts so I'm not sure how it'll behave in a web process or what the security requirements are, but it might help you out.

PhilCo