使用
Fiddler
我们看到了
每个呼叫3个HTTP请求(和匹配的响应)
什么时候:
-
已启用WS-ReliableMessaging,并且,
-
该方法返回大量数据(17MB)
第一个HTTP请求是带有“createSequence”操作的SOAP消息(假定可以建立可靠的会话)。第二个和第三个HTTP请求是调用WebService方法的相同SOAP消息。为什么有两条相同的信息?
这是我们的配置:
<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" />
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="LargeServiceBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
谢谢,
布瑞恩