wsDualHttpBinding failing with larger datasets
I am using wsDualBinding in my wcf service to handle 2 way communication in my software. Everything seems to work fine except when I call a method to get a customer list. If in the service I limit the results of the query to 2730 records I can get the results in about 1-2 seconds and display them in a datagrid. If I limit the results to 2731 (one more) I get the following Error:
http://localhost:8731/Design_Time_Addresses/Dispatch_Studio_Server/DispatchService/ did not receive a reply within the configured timeout (00:00:59.9990000). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.
In my research I have read that streaming is better for larger datasets so I have also tried setting up a basicHttpBinding endpoint using streaming instead of buffering and I get essentially the same results. 2730 records works fine but 2731 records gives me the following error.
An error (Unable to read data from the transport connection: The connection was closed.) occurred while transmitting data over the HTTP channel.
I wouldn't exactly call 2730 records a large dataset. This lead开发者_运维技巧s me to believe there is something else causing this issue.
Here is my client configuration:
<system.serviceModel>
Here is my server configuration:
<system.serviceModel>
As you can see I have tried changing the maxMessageReceivedSize and other settings to resolve this issue but to no avail.
Thanks for your time.
Apart from the fact that you should never send such a big amount of data to a client (I doubt the client will perform a task on the complete set of data), you may be hitting the MaxSerializedObjectsInGraph limit.
Try to add a behavior in your configurations containing:
<dataContractSerializer maxItemsInObjectGraph="2147483646" />
You may also consider returning a smaller resultset using pagination or filtering.
精彩评论