Reputation: 171
I am building a library project that will record the values of ASP.NET Performance Counters when used with a ASP.NET Project. But when I try to run the following code -
var _RequestsPerSecond = new PerformanceCounter("ASP.NET Applications", "Requests/sec", Process.GetCurrentProcess().ProcessName);
_RequestsInApplicationQueueValue = _RequestsInApplicationQueue.NextValue();
It gives me the error iis express does not exist in this category. Any suggestions.?
Upvotes: 0
Views: 712
Reputation: 129
replace Process.GetCurrentProcess().ProcessName as System.Web.Hosting.HostingEnvironment.ApplicationID.Replace('/', '_')
Upvotes: 1