私は WPF と WCF の間に DuplexCommunication を実装しようとしていましたが、ネットワーク内で内部的にテストすると通信がうまく機能し、外部に公開した後にこの外部ネットワークにアクセスしようとすると、Web ブラウザーを介してサービスにアクセスできます。しかし、接続を開こうとすると、WPF クライアントがエラーを出しています。以下は、サーバー側とクライアント側の両方の構成です。サーバ:
<wsDualHttpBinding>
<binding closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="None" />
</binding>
</wsDualHttpBinding>
<service behaviorConfiguration="DuplexServices.DuplexServiceBehavior" name="DuplexServices.DuplexService">
<endpoint address="dual" binding="wsDualHttpBinding" contract="DuplexServices.IDuplexService" >
</endpoint>
</service>
クライアント:
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_DuplexService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" >
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="None">
</security>
</binding>
</wsDualHttpBinding>
<client>
<endpoint address="http://XXX.com/DuplexServices/DuplexService.svc/dual"
binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_DuplexService"
contract="DuplexServiceeReference.DuplexService" name="WSDualHttpBinding_DuplexService">
</endpoint>
</client>
サーバー側でdns値を使用して「baseAddresses」と「identity」を指定しようとしましたが、クライアント側でもclientBaseAddressを指定しようとしましたが、それでもネットワーク外では機能しません。
WPF アプリケーションから二重接続を開こうとすると、常にタイムアウト エラーが発生する: エラー: 「00:00:09.4911018 の割り当てられたタイムアウト内で、開く操作が完了しませんでした。この操作に割り当てられた時間は、より長いタイムアウトの一部であった可能性があります。 ."
構成部分に何か問題があると思いますが、それが何であるかはわかりません。これに関するヘルプは大歓迎です。
ありがとう。