Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am getting this error in the Production environment (Windows Server 2008, IIS 7) for a website.

The requested Performance Counter is not a custom counter, it has to be initialized 
as ReadOnly.

Description: An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and where
it originated in the code. 

Exception Details: System.InvalidOperationException: The requested Performance Counter 
is not a custom counter, it has to be initialized as ReadOnly.

Source Error: 

An unhandled exception was generated during the execution of the current web request.
Information regarding the origin and location of the exception can be identified using
the exception stack trace below.

Stack Trace: 


[InvalidOperationException: The requested Performance Counter is not a custom counter,
it has to be initialized as ReadOnly.]
System.Diagnostics.PerformanceCounter.InitializeImpl() +1238
System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName,
String instanceName, Boolean readOnly) +284
Microsoft.EnterpriseInstrumentation.EventSourceCounters..ctor(String eventSourceName,
String eventSourceFullName, Boolean isRequestEventSource) +463
Microsoft.EnterpriseInstrumentation.EventSource..ctor(String name, String description, 
Boolean checkName) +785
Microsoft.EnterpriseInstrumentation.EventSource..cctor() +194

How so I resolve it?

share|improve this question
    
screenshot is unreadable, better just paste the text –  kubanczyk Dec 9 '11 at 10:03

1 Answer 1

up vote 0 down vote accepted

I resolved it by installing Microsoft enterprise library, and then running "c:\program files\microsoft enterprise library 5.0\InstallServices.bat"

Note: As it was installing, I saw some references to Perfomance counter see screenshot here: http://goo.gl/cFbgh

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.