tags:

views:

306

answers:

1

The title pretty much says it all. Some caveats are:

  • I need to be able to do it in C#
  • It needs to be able to be done from a remote server (ie, running on one server, checking IIS on another)
  • Needs to be close to real-time (within 1 second)
  • Can use WMI calls

I've tried watching the log file, but it turns out that isn't nearly close enough to real-time.

Thanks!

EDIT: I put this in a comment on Tom's answer, but it's more visible here:

I was able to look for changes using this counter:

var perf = new PerformanceCounter("ASP.NET Apps v2.0.50727", "Requests Total", "_LM_W3SVC_[IIS-Site-ID]_ROOT", "[Server-Name]");
+4  A: 

How about reading the ASP.NET requests/sec performance counter on the remote machine?

The System.Diagnostics.PerformanceCounter class has a constructor which takes a machine name.

Tom Jelen
I was able to look for changes using this counter: var perf = new PerformanceCounter("ASP.NET Apps v2.0.50727", "Requests Total", "_LM_W3SVC_[IIS-Site-ID]_ROOT", "[Server-Name]");Thanks!
Daniel Schaffer