2013-07-03 23 views
0

我有WCF服務(由IIS託管),與Intranet環境中的wsDuallHttpBinding一起使用,沒有域控制器。wsDualHttpBinding不適用於Intranet中的某些客戶端

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

回答

0

你在客戶端中wsdualhttpbinding結合記得clientBaseAddress="http://IP:PORT/NameService"

相關問題