如题,查询一个数据集,
存储过程返回如:select * from B
中间层定义 public DataSet GetTable(string 查询条件);
客户端定义 DataSet ds = wcfClient.GetTable("")
以前一直正常着,查询也很快速,这两天不知修改到哪了,所有的查询如果返回记录较大时(100条左右),客户端就会出现服务端返回的异常错误“创建MTOM消息读取器时出错”
客户端 app.config 配置如下
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IWS_JXC" openTimeout="00:10:00"
receiveTimeout="00:20:00" sendTimeout="00:10:00" maxBufferPoolSize="999999999"
maxReceivedMessageSize="999999999" messageEncoding="Mtom" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://127.0.0.1/JXC_AT/Service/WS_JXC.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWS_JXC"
contract="Ref_WS_JXC.IWS_JXC" name="BasicHttpBinding_IWS_JXC" />
</client>
<behaviors>
<endpointBehaviors>
<behavior name="SerializerBehaviour">
<dataContractSerializer maxItemsInObjectGraph="999999999" />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
估计是消息编码器在进行消息编码的时候数据量过大所致,设置一下最大读取数量和写入数量