2012-03-26 18 views
2

に表示されないので、私はweb.configファイルにこれを追加しました:実行した後WCFサービスのインスタンスは、私は自己ホスト型WCFサービスを持っていると私はパフォーマンスカウンタを有効にしようとしているのperfmon

<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> 

なぜパフォーマンスモニタが実行されているすべてのインスタンスを表示しないのですか?

ところで、それはまだ有効である場合はapp.configを使用して、.NET v4の

答えて

0

を実行するための強調表示されていない場合か分からないのですが、私は答えを試してみましょう。

あなたがチェックすべき多くのものがあります。

  • あなたには、いくつかのカウンタがServiceModelXXX 4.0.0.0になります.NET 4を標的にしているが。
  • 場合によっては、WCFカウンタを再インストールする必要があります。コマンドラインはpostにアクセスしてください。
  • 最初の呼び出しがあるまで(AppFabricの自動起動を使用していない場合)のインスタンスが存在しないカウンター
  • アカウントが必要と権限が必要です:パフォーマンスモニタ/ログインユーザー
関連する問題