[英]Return large data on service
I have a method that returns a large list of objects. 我有一个返回大量对象的方法。 When I return a few objects (10) everything works great.
当我返回一些物体(10)时,一切都很好。 The problem is when I try to return 100 objects.
问题是当我尝试返回100个对象时。 The reason why the list is so big is because the objects in the list have other objects inside so I am basically returning a tree.
列表如此之大的原因是因为列表中的对象内部有其他对象,所以我基本上返回了一棵树。
Anyways I am using named pipes and here is the configuration of the enpoint I am using: 无论如何我使用命名管道,这是我正在使用的enpoint的配置:
<netNamedPipeBinding>
<binding name="NetNamedPipeBinding_ISymbolFileParser"
closeTimeout="00:10:00"
openTimeout="00:10:00"
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
transactionFlow="false"
transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647"
maxBufferSize="2147483647"
maxConnections="10"
maxReceivedMessageSize="2147483647"
>
<readerQuotas
maxDepth="32"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="4096"
maxNameTableCharCount="2147483647" />
</binding>
</netNamedPipeBinding>
When I limit the number of objects by doing results.Take(10).ToArray();
当我通过做
results.Take(10).ToArray();
限制对象的数量时。采取results.Take(10).ToArray();
everything works great. 一切都很好。 When I return 100 objects I get the exception:
当我返回100个对象时,我得到了异常:
Things I have done to try to solve the problem: 我尝试解决问题的方法:
I will like to take also an opportunity to ask if I should be using a different binding. 我还想借此机会询问我是否应该使用不同的绑定。 I heard that shared memory is the fastes but I don't know how to use that on wcf.
我听说共享内存是紧张的,但我不知道如何在wcf上使用它。 Because I am communicating between the same machine I am using named pipes.
因为我在同一台机器之间进行通信,所以我正在使用命名管道。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.