I created a new Performance Counter Category and added three new
counters.
Used InstallUtil.exe to create them on remote production server. I can
see
the custom counter category and counters.
I have a web site built with Commerce Server 2002 and .NET 1.1. I am
trying
to increment and/or decrement counter values for every session start
and
session end. But I get this exception thrown below. I have also
included the
VB.NET code snippet that throws this exception. Can anyone tell me how
to fix
this or where to get more information on what kind of error is this?
System.InvalidOperationException: Custom counters file view is out of
memory. at
System.Diagnostics.SharedPerformanceCounter.Create Category(Int32
categoryNameHashCode, String categoryName, Int32 counterNameHashCode,
String
counterName, Int32 instanceNameHashCode, String instanceName) at
System.Diagnostics.SharedPerformanceCounter.GetCou nter(String
categoryName,
String counterName, String instanceName) at
System.Diagnostics.SharedPerformanceCounter..ctor( String categoryName,
String
counterName, String instanceName) at
System.Diagnostics.PerformanceCounter.Initialize() at
System.Diagnostics.PerformanceCounter..ctor(String categoryName, String
counterName, String instanceName, Boolean readOnly) at
System.Diagnostics.PerformanceCounter..ctor(String categoryName, String
counterName, Boolean readOnly) at
Code Snippet Used in VB.NET
If PerformanceCounterCategory.Exists("CategoryName") Then
If PerformanceCounterCategory.CounterExists("ActiveUs ers",
"CategoryName") Then
Dim myCounter As PerformanceCounter = New
PerformanceCounter("CategoryName", "ActiveUsers", False)
myCounter.Increment()
myCounter.Close()
End If
End If
Thanks much
TechMate