Ich habe einen WCF-Dienst, der mit einem WsDualHttpBinding gearbeitet hat, aber ich schreibe es neu, um eine CustomBinding für größere Konfigurierbarkeit zu verwenden. Hier ist meine Dienstbindung:WCF Benutzerdefinierte Bindung - Dienst antwortet, Client nicht
<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>
und Kundenbindung:
<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>
Alles funktioniert gut, wenn ich es gegen http://localhost/Code/Code.svc laufen, aber, sobald ich den Client setzen woanders, es funktioniert nicht. Ich glaube nicht, dass es Probleme mit der Firewall gibt, weil die alte Version, die das wsDualHttpBinding verwendet, in Ordnung ist. Auch weil ich es mit einem Drahtseil gescheuert habe.
Beide Versionen schicken ihre CreateSequence Anfrage
<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>
und einen HTTP-202 aus dem Dienst akzeptiert erhalten, aber der neue Client geht nie die eigentliche Funktion Anrufanforderung zu senden. Das alte startet es sofort, aber die neue Bindung hängt, bis das SendTimeout erfüllt ist und es eine Ausnahme auslöst. Worauf wartet meine neue Bindung, die bewirkt, dass die Funktionsaufrufanforderung nicht gesendet wird und wie kann ich aufhören zu warten? Vielen Dank!