I was trying to implement a DuplexCommunication between WPF and WCF, the communication is working good when test internally, with in the network, when we tried to access this outside network after publishing it outside, we are able to access the service thru web browser, but the WPF client is giving error, when we try to open the connection. below are the configuration on both Server and Client side. Server:
<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>
我尝试过在服务器端提供baseAddresses和带有dns值的身份,也尝试过在客户端提供clientBaseAddress,但在网络之外仍然无法工作。
always getting timeout error when trying to open the duplex connection from WPF application: Error: "The open operation did not complete within the allotted timeout of 00:00:09.4911018. The time allotted to this operation may have been a portion of a longer timeout."
我认为配置部分有问题,但不确定是什么,非常感谢在这方面的任何帮助。
谢谢