2012-01-26 2 views
0

내 네트워크의 한 컴퓨터에서 WCF 서비스를 호스팅하는 Windows 서비스가 있습니다. 네트워크상의 다른 컴퓨터에서 클라이언트에 연결하려고합니다. 연결하여 WCF 서비스에 가입하려고하면 다음과 같은 오류가 발생합니다.WCF 클라이언트 오류 - 응답을 기다리는 동안 요청 채널 시간이 초과되었습니다.

00:00 : 09.9989999 이후에 응답을 기다리는 동안 요청 채널 시간이 초과되었습니다. Request에 대한 호출에 전달 된 제한 시간 값을 늘리거나 Binding에서 SendTimeout 값을 늘리십시오. 이 작업에 할당 된 시간은 더 긴 제한 시간의 일부일 수 있습니다.

클라이언트와 서비스를 모두 추적하여 문제점을 파악할 수 있도록 추가했으나 이해할 수 없습니다. 여기

는 서비스의 app.config입니다 :

<?xml version="1.0"?> 
<configuration> 
    <system.serviceModel> 
    <services> 
     <service name="OSAERest.api" behaviorConfiguration="MyServiceBehavior"> 
     <endpoint address="http://localhost:8732/api" 
        binding="webHttpBinding" 
        contract="OSAERest.IRestService" 
        behaviorConfiguration="WebHttp"/> 
     </service> 
     <service name="WCF.WCFService" behaviorConfiguration="WCFBehavior"> 
     <endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="WCFBinding" contract="WCF.IWCFService"> 
      <identity> 
      <dns value="localhost" /> 
      </identity> 
     </endpoint> 
     <endpoint 
      address="mex" 
      binding="mexHttpBinding" 
      bindingConfiguration="" 
      contract="IMetadataExchange"/> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:8731/Design_Time_Addresses/WCF/WCFService/" /> 
      </baseAddresses> 
     </host> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="MyServiceBehavior"> 
      <serviceMetadata httpGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
     </behavior> 
     <behavior name="WCFBehavior"> 
      <serviceMetadata httpGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
      <dataContractSerializer maxItemsInObjectGraph="6553600" /> 
      <serviceTimeouts transactionTimeout="05:05:00" /> 
      <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" 
      maxConcurrentInstances="2147483647" /> 
     </behavior> 
     </serviceBehaviors> 
     <endpointBehaviors> 
     <behavior name="WebHttp"> 
      <webHttp /> 
     </behavior> 
     </endpointBehaviors> 
    </behaviors> 
    <bindings> 
     <wsDualHttpBinding> 
     <binding name="WCFBinding"> 
      <security mode="None"> 
      </security> 
     </binding> 
     </wsDualHttpBinding> 

    </bindings> 
    </system.serviceModel> 
    <startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> 
    </startup> 
    <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <probing privatePath="lib" /> 
    </assemblyBinding> 
    </runtime> 
    <system.diagnostics> 
    <sources> 
     <source name="System.ServiceModel" 
       switchValue="Information, ActivityTracing" 
       propagateActivity="true"> 
     <listeners> 
      <add name="traceListener" 
       type="System.Diagnostics.XmlWriterTraceListener" 
       initializeData= "Logs\ServiceTraces.svclog" /> 
     </listeners> 
     </source> 
    </sources> 
    </system.diagnostics> 
</configuration> 

그리고 여기에 클라이언트의 app.config입니다 :

<?xml version="1.0"?> 
<configuration> 
    <appSettings> 

    <add key="ServiceIP" value="127.0.0.1"/> 


    </appSettings> 
    <startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> 
    </startup> 
    <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <probing privatePath="lib" /> 
    </assemblyBinding> 
    </runtime> 
    <system.serviceModel> 
    <bindings> 
     <wsDualHttpBinding> 
     <binding name="WSDualHttpBinding_IWCFService" closeTimeout="00:00:10" 
      openTimeout="00:00:10" receiveTimeout="00:00:10" sendTimeout="00:00:10" 
      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"> 
      <message clientCredentialType="Windows" negotiateServiceCredential="true" /> 
      </security> 
     </binding> 
     </wsDualHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="http://localhost:8731/Design_Time_Addresses/WCF/WCFService/" 
     binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_IWCFService" 
     contract="WCFService.IWCFService" name="WSDualHttpBinding_IWCFService"> 
     <identity> 
      <dns value="localhost" /> 
     </identity> 
     </endpoint> 
    </client> 
    </system.serviceModel> 
    <system.diagnostics> 
    <sources> 
     <source name="System.ServiceModel" 
       switchValue="Information, ActivityTracing" 
       propagateActivity="true"> 
     <listeners> 
      <add name="traceListener" 
       type="System.Diagnostics.XmlWriterTraceListener" 
       initializeData= "Logs\Traces.svclog" /> 
     </listeners> 
     </source> 
    </sources> 
    </system.diagnostics> 
</configuration> 

가 서비스에 대한 추적은 연결 세부 사항이 너무 클라이언트에서 오는 표시 조금씩 통과해야합니다. 또한 서비스와 동일한 시스템에서 클라이언트를 실행하면 모든 것이 완벽하게 작동합니다. 원격 연결을 작동 시키려면 어떻게해야합니까?

+0

클라이언트에 문제가있는 경우 클라이언트 구성을 확인하십시오. 보내기 제한 시간 값을 10 초로 설정했습니다. 문제가 해결되는지 확인하기 위해 제한 시간 값을 늘리려고 시도 했습니까? – Tim

+0

예, 1 분으로 설정했지만 여전히 동일한 오류가 발생합니다. – Brian

+0

문제는 서비스가 아니라 클라이언트에 얼마나 긍정적입니까? 서비스에서 예외 또는 다른 문제가 발생하여 제한 시간을 초과 할 수 있기 때문에 요청합니다. 아직 고려하지 않은 경우 고려할 또 다른 가능성. – Tim

답변

0

이 가장 가능성이 방화벽 문제입니다 - wsDualHttpBinding은 방화벽

NetTcpBinding에 의해 차단 될 가능성이 클라이언트에 다시 서버에서 두 번째 연결을 시도한다 훨씬 더 강력한 양방향 통신을 위해 내가 블로그로 here

관련 문제