2016-10-13 2 views
0

wsDualHttpBinding을 사용하여 작동하는 WCF 서비스가 있지만 커스터마이징을 위해 customBinding을 사용하도록 다시 작성하고 있습니다.WCF 사용자 지정 바인딩 - 클라이언트가 응답하지 않습니다. 클라이언트가 없습니다.

<customBinding> 
    <binding name="CodeServiceBinding" openTimeout="00:01:00"> 
     <transactionFlow transactionProtocol="WSAtomicTransactionOctober2004"/> 
     <reliableSession acknowledgementInterval="00:00:00.2" flowControlEnabled="true" 
      inactivityTimeout="00:05:00" maxPendingChannels="4" maxRetryCount="8" 
      maxTransferWindowSize="8" ordered="true" reliableMessagingVersion="Default" /> 
     <compositeDuplex/> 
     <oneWay maxAcceptedChannels="10"> 
      <channelPoolSettings idleTimeout="00:02:00" leaseTimeout="00:10:00" maxOutboundChannelsPerEndpoint="10" /> 
     </oneWay> 
     <textMessageEncoding messageVersion="Soap12WSAddressing10"/> 
     <httpTransport allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" 
             decompressionEnabled="true" keepAliveEnabled="true" manualAddressing="false" 
             maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxPendingAccepts="0" 
             maxReceivedMessageSize="2147483647" proxyAuthenticationScheme="Anonymous" 
             transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" 
             useDefaultWebProxy="true" /> 
    </binding> 
</customBinding> 

그리고 클라이언트 바인딩 : 여기에 바인딩 내 서비스의 나는 최대한 빨리 다른 곳에서 클라이언트를 넣어, http://localhost/Code/Code.svc에 대해 그것을 실행되지만 때

<system.serviceModel xdt:Transform="Replace"> 
    <bindings> 
     <customBinding> 
      <binding name="Code.DualEndPoint" openTimeout="00:00:10" sendTimeout="00:00:10"> 
       <transactionFlow transactionProtocol="WSAtomicTransactionOctober2004"/> 
       <reliableSession inactivityTimeout="00:05:00" /> 
       <compositeDuplex /> 
       <oneWay /> 
       <textMessageEncoding messageVersion="Soap12WSAddressing10" /> 
       <httpTransport authenticationScheme="Anonymous" /> 
      </binding> 
     </customBinding> 
    </bindings> 
    <client> 
     <endpoint address="http://1.2.3.4/Code/Code.svc" 
     binding="customBinding" bindingConfiguration="Code.DualEndPoint" 
     contract="CodeProxy.ICode" name="Code.DualEndPoint" /> 
    </client> 
</system.serviceModel> 

모든 것이 잘 작동, 그것은 작동하지 않습니다. wsDualHttpBinding을 사용하는 이전 버전이 정상적으로 작동하므로 방화벽 문제라고 생각하지 않습니다. 또한 내가 그것을 wiresharked.

두 버전은 CreateSequence 요청을

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> 
    <s:Header> 
     <a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</a:Action> 
     <a:MessageID>urn:uuid:222d5f6a-cca4-4a4b-b8bc-3347b81b425a</a:MessageID> 
     <a:ReplyTo> 
      <a:Address>http://1.2.3.4:1234/CodeClient/8f191330-523a-4820-a784-46fe364aebcc</a:Address> 
     </a:ReplyTo> 
     <a:To s:mustUnderstand="1">http://hostname.com/Code/Code.svc</a:To> 
    </s:Header> 
    <s:Body> 
     <CreateSequence xmlns="http://schemas.xmlsoap.org/ws/2005/02/rm"> 
      <AcksTo> 
       <a:Address>http://1.2.3.4:1234/CodeClient/8f191330-523a-4820-a784-46fe364aebcc</a:Address> 
      </AcksTo> 
      <Offer> 
       <Identifier>urn:uuid:f7a18edc-e79f-4d96-a90d-696d1055b592</Identifier> 
      </Offer> 
     </CreateSequence> 
    </s:Body> 
</s:Envelope> 

을 보내 서비스에서 허용하는 HTTP (202)을받을 수 있지만 새 클라이언트는 결코 실제 함수 호출 요청을 보낼 간다. 이전 버전에서는 즉시 시작하지만 SendTimeout이 충족 될 때까지 새로운 바인딩이 중단되어 예외가 발생합니다. 새로운 바인딩이 함수 호출 요청을 보내지 않게하고 대기를 멈추게하려면 어떻게해야합니까? 감사!

답변

0

내 클라이언트 바인딩에 내 <compositeDuplex/> 요소에서 clientBaseAddress을 생략하면 해당 응답을 전달할 위치에 대한 서비스가 혼동 스러웠습니다. 나는 모른다. 어느 쪽이든, 지금은 업데이트 된 노드와 함께 일하고있다 :

<compositeDuplex clientBaseAddress="http://1.2.3.4:1234/CodeClient"/> 

<compositeDuplex/> 여전히 내 서비스의 web.config에 attributeless. 그러나 지금은 다른 문제에 직면하고 있습니다. 사용자 지정 바인딩에 대해 프로그래밍 방식으로 clientBaseAddress을 업데이트하는 것은 매우 어렵습니다.

관련 문제