2
沒有顯示我有一個自託管WCF服務,我試圖啓用性能計數器,所以我已經加入這個web.config文件:WCF服務實例在性能監視器
<system.serviceModel>
<diagnostics performanceCounters="All" />
...
運行後我服務並確保它正在運行,然後打開perfmon.exe並嘗試添加性能計數器。但是,「所選對象的實例」框中沒有顯示任何內容。
我的app.config:
<?xml version="1.0"?>
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
</listeners>
</source>
</sources>
</system.diagnostics>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<system.serviceModel>
<diagnostics wmiProviderEnabled="true" performanceCounters="All">
<messageLogging logMalformedMessages="false" logMessagesAtServiceLevel="false"
logMessagesAtTransportLevel="false" />
</diagnostics>
<bindings>
<ws2007HttpBinding>
<binding name="soapBinding" maxReceivedMessageSize="1073741824">
<readerQuotas maxStringContentLength="1073741824" maxArrayLength="1073741824" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
</security>
</binding>
</ws2007HttpBinding>
</bindings>
<services>
<service behaviorConfiguration="defaultBehavior" name="SoapService">
<endpoint address="http://localhost/SoapService/"
binding="ws2007HttpBinding" bindingConfiguration="soapBinding" name=""
contract="ISoapService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost/SoapService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="defaultBehavior">
<serviceAuthorization impersonateCallerForAllOperations="false" />
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
爲什麼perfmon的不會出現任何實例上運行?
順便說一句,如果在app.config並不突出你運行.NET V4