【问题标题】:wsDualHttpBinding doesn't work for some clients in IntranetwsDualHttpBinding 不适用于 Intranet 中的某些客户端
【发布时间】:2013-07-03 18:51:14
【问题描述】:

我有在没有域控制器的 Intranet 环境中与 wsDualHttpBinding 一起使用的 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>

【问题讨论】:

    标签: .net wcf intranet wsdualhttpbinding


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2011-01-09
      • 2016-07-08
      • 2011-12-08
      • 1970-01-01
      • 1970-01-01
      • 2020-04-06
      • 2021-02-18
      • 1970-01-01
      • 2013-01-31
      相关资源
      最近更新 更多