G
Guest
We are having problems instantiating performance counters if Perfmon is open. We get the error:
"System.InvalidOperationException: Cannot create file mapping.
at System.Diagnostics.FileMapping.Initialize()
at System.Diagnostics.FileMapping..ctor()
at System.Diagnostics.SharedPerformanceCounter.get_FileView()
at System.Diagnostics.SharedPerformanceCounter.ResolveOffset(Int32 offset)
at System.Diagnostics.SharedPerformanceCounter.GetCounter(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)"
What's the deal? And don't say, "Then make sure perfmon is closed when you make the call.", because we have perfmon monitoring our services all day long. We can't stop monitoring just so we can start and stop one of our services.
"System.InvalidOperationException: Cannot create file mapping.
at System.Diagnostics.FileMapping.Initialize()
at System.Diagnostics.FileMapping..ctor()
at System.Diagnostics.SharedPerformanceCounter.get_FileView()
at System.Diagnostics.SharedPerformanceCounter.ResolveOffset(Int32 offset)
at System.Diagnostics.SharedPerformanceCounter.GetCounter(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)"
What's the deal? And don't say, "Then make sure perfmon is closed when you make the call.", because we have perfmon monitoring our services all day long. We can't stop monitoring just so we can start and stop one of our services.