After deploying multiple websites to a production server, the following events were occurring very frequently, filling my Application log:
#1
Event Source: Enterprise Library Instrumentation
Event ID: 0
Description:
Failed to create instances of performance counter ‘Total Command Executions’ - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly..
#2
Description:
Failed to create instances of performance counter ‘Average Command Execution Time’ - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly..
#3
Description:
Failed to create instances of performance counter ‘# of Commands Executed/Sec’ - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly..
and #4
Description:
Failed to create instances of performance counter ‘# of Connections Opened/Sec’ - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly..
Rather than installing Enterprise Library on the Production server, I found an easy solution to the problem and start providing Perfmon statistics.
To Fix this, just run:
%windir%\Microsoft.NET\Framework\<version>\installutil.exe <asp.net website>\bin\Microsoft.Practices.EnterpriseLibrary.Data.dll
After that, you should get the following event log message indicating everything’s fine:
Event Type: Information
Event Source: LoadPerf
Event Category: None
Event ID: 1000
Description:
Performance counters for the Enterprise Library Data Service (Enterprise Library Data Service) service were loaded successfully. The Record Data contains the new index values assigned to this service.







Recent Comments