0

我有在没有域控制器的 Intranet 环境中与 wsDuallHttpBinding 一起使用的 WCF 服务(由 IIS 托管)。

 <system.serviceModel>    
    <bindings>

      <wsDualHttpBinding>
        <binding name="BasicDuplexBinding" closeTimeout="00:03:00" openTimeout="00:03:00"
              receiveTimeout="00:03:00" sendTimeout="00:03:00" bypassProxyOnLocal="false"
              hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647"
              maxReceivedMessageSize="2147483647" messageEncoding="Mtom"
                 textEncoding="utf-8" useDefaultWebProxy="true" >
          <security mode="None">
            <message clientCredentialType="None"/>
          </security>
          <readerQuotas ... />
        </binding>
      </wsDualHttpBinding>
    </bindings>
    <services>
      <service name="..." behaviorConfiguration="myBehavior">
        <endpoint address=""
          binding="wsDualHttpBinding" bindingConfiguration="BasicDuplexBinding"
          name="Basic" contract="UniDubna.InfSys.Document.WcfDocManager.Contracts.Reporting.IReportService" />
      </service>
    </services>

    <behaviors>
      <serviceBehaviors>
        <behavior name="myBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceThrottling maxConcurrentCalls="10" maxConcurrentInstances="500" maxConcurrentSessions="500"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

一些客户端工作站与 WCF 服务完美配合,一些客户端工作站无法建立连接(达到超时)。同时我可以http://my-server/my-service.svc在每个客户端的浏览器中打开文件,并可以获得“wsdl”描述。我猜有些客户由于防火墙而无法建立两种通信方式。我该如何检查?如何控制客户端的回调端口,最好在配置文件中?

客户端配置如下所示:

...
 <system.serviceModel>
    <bindings>
      <wsDualHttpBinding>
        <binding name="BasicDuplexBinding" closeTimeout="00:02:00" openTimeout="00:02:00"
              receiveTimeout="00:02:00" sendTimeout="00:02:00" bypassProxyOnLocal="false"
              hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647"
              maxReceivedMessageSize="2147483647" messageEncoding="Mtom"
              textEncoding="utf-8" useDefaultWebProxy="true" >
          <security mode="None">
            <message clientCredentialType="None"/>
          </security>
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </wsDualHttpBinding>

...

<client>
      <endpoint name="myService" bindingConfiguration="BasicDuplexBinding"  address="http://my-server/my-service.svc" binding="wsDualHttpBinding" contract="..."/>
</client>
4

1 回答 1

0

你还记得clientBaseAddress="http://IP:PORT/NameService"在客户端绑定 wsdualhttpbinding 吗?

于 2013-10-01T06:03:32.607 回答