WCF ReliableMessaging method called twice
Using Fiddler, we see 3 HTTP requests (and matching responses) for each call when:
- WS-ReliableMessaging is enabled, and,
- the method returns a large amount of data (17MB)
The first HTTP request is a SOAP message with the action "CreateSequence" (presumable to establish the reliable session). The second and third HTTP requests are identical SOAP messages invoking our webservice method. Why are there two identical messages?
Here is our config:
<system.serviceModel>
<client>
<endpoint address="http://server/vdir/AccountingService.svc"
binding="wsHttpBinding"
bindingConfiguration="customWsHttpBinding"
behaviorConfiguration="LargeServiceBehavior"
contract="MyProject.Accounting.IAccountingService"
name="BasicHttpBinding_IAccountingService" />
</client>
<bindings>
<wsHttpBinding>
<binding name="customWsHttpBinding" maxReceivedMessageSize="90000000">
<reliableSession enabled="true"/>
<security mode="None" />开发者_Python百科;
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="LargeServiceBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
Thanks,
Brian
This was caused by ReliableMessaging re-trying. The message took over 2 seconds to process and transmit.
精彩评论