Estou recebendo esse erro no ambiente de produção (Windows Server 2008, IIS 7) de um site.
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
Como eu resolvo isso?
windows-server-2008
iis
asp.net
robasta
fonte
fonte
Respostas:
Eu o resolvi instalando a biblioteca corporativa da Microsoft e executando "c: \ arquivos de programas \ microsoft enterprise library 5.0 \ InstallServices.bat"
Nota: Enquanto estava instalando, vi algumas referências ao contador Perfomance, veja a captura de tela abaixo:
fonte