wsDualHttpBinding对Intranet中的某些客户端不起作用

时间:2013-07-03 18:51:15

标签: .net wcf intranet wsdualhttpbinding

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

 <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”描述。我猜有些客户因防火墙而无法建立2种通信方式。我该怎么检查?如何控制客户端的回调端口,最好是在配置文件中?

客户端配置如下:

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

1 个答案:

答案 0 :(得分:0)

您是否记得客户端wsdualhttpbinding绑定中的clientBaseAddress="http://IP:PORT/NameService"