0

コンソールアプリケーションでポーリングデュプレックスバインディングを設定する際に問題が発生しています。app.configコンソールアプリケーションでポーリングデュプレックスを設定する

<extensions> 
     <bindingExtensions> 
     <add name="pollingDuplexHttpBinding" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement, 
     System.ServiceModel.PollingDuplex, 
     Version=4.0.0.0, 
     Culture=neutral, 
     PublicKeyToken=31bf3856ad364e35"/> 
     </bindingExtensions> 
    </extensions> 

    <services> 
     <service behaviorConfiguration="PositionBehaviour" name="RabbitMQSub.PositionUpdates"> 
     <endpoint address="positionsDUPLEX" binding="pollingDuplexHttpBinding" contract="RabbitMQSub.IPositionUpdates"> 
      <identity> 
      <dns value="localhost" /> 
      </identity> 
     </endpoint> 

     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:8732/RabbitMQSub/PositionsDUPLEX" /> 
      </baseAddresses> 
     </host> 

     </service> 
    </services> 

<behaviors> 
    <serviceBehaviors> 
    <behavior name="PositionBehaviour"> 
     <serviceMetadata httpGetEnabled="true"/> 
     <serviceDebug includeExceptionDetailInFaults="true"/> 
     <dataContractSerializer maxItemsInObjectGraph="2147483647"/> 
     <serviceTimeouts transactionTimeout="10:00:00"/> 
     <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="2147483647"/> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 

質問

  • は、次のとおりです。

    またConfiguration binding extension 'system.serviceModel/bindings/pollingDuplexHttpBinding' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly.

    、ここに私のapp.configからの抜粋です:これは私が受けていますエラーですコンソールでポーリングデュプレックスを設定することも可能ですアプリ?

  • もしそうなら、私は間違っていますか?

おかげ

答えて

0

は、私の知る限りでは、PollingDuplexHttpBindingは、.NET Frameworkのクライアント側コンポーネントとして使用することはできません。

実際には、通知を発行するクライアントにデュプレックス機能は必要ありません.BaseHttpBindingのような単純なバインディングを介して公開される別の要求/応答WCFサービスの終了として構築できます。デュプレックス契約で非同期通知を受信する必要があるWindowsアプリケーションまたはコンソールクライアントの場合は、双方向通信を提供するWsDualHttpBindingまたはNetTcpBindingの使用を検討してください。

最新のリリースの.NET Framework(多分そうではないかもしれませんが)で、これが変更されている可能性があります。利用可能であれば、System.ServiceModel.PollingDuplex.dllへの参照を追加してみてください。

関連する問題