I have a WCF service that's been working with a wsDualHttpBinding but I'm rewriting it to use a customBinding for greater configurability. Here's my service binding:
<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>
And client binding:
<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>
Everything works great when I run it against http://localhost/Code/Code.svc but, as soon as I put the client somewhere else, it doesn't work. I don't think it's firewall issues because the old version using the wsDualHttpBinding works ok. Also because I wiresharked it.
Both versions send their CreateSequence request
<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>
and receive an HTTP 202 accepted from the service, but the new client never goes to send the actual function call request. The old one starts it right away but the new binding hangs until the SendTimeout is met and it throws an exception. What is my new binding waiting for that causes it not to send the function call request and how can I make it stop waiting? Thanks!
By omitting clientBaseAddress
from my <compositeDuplex/>
element in my client binding, I guess I was confusing the service about where to direct its response? I don't know. Either way, it is now working with this updated node:
<compositeDuplex clientBaseAddress="http://1.2.3.4:1234/CodeClient"/>
<compositeDuplex/>
is still attributeless in my service web.config. However, now I'm facing a different problem. Programmatically updating the clientBaseAddress
for a custom binding is proving to be quite difficult.