views:

16

answers:

1

I've used the ThreadPool.GetAvailableThreads to monitor the thread usage in a web site, and written the results to a performance counter. To do this, I've had a thread running in the site that does the monitoring. I'd like to be able to monitor this without modifying sites' code. Is there a way I can write a console app that would be able to access the thread pool of a given process, rather than the current process, and call GetAvailableThreads for that pool?

A: 

Sure. Have a look at this: http://msdn.microsoft.com/en-us/library/ff650682.aspx The information is deprecated because IIS 7 implements ASP.NET app pooling (and thus thread pooling) a different way, but if you use a "Classic .NET App Pool" it should still work.

KeithS
I'd seen that article before, but it didn't occur to me that I could create a new site in the same app pool. It's not exactly what I was looking for, but I guess it gets the job done.
joelt