Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Maybe the MaxArrayLength isn't the right property to set.</p> <p>Try "maxBufferSize" and "MaxBufferPoolSize":</p> <pre><code>&lt;bindings&gt; &lt;netTcpBinding&gt; &lt;binding name="unsecureNetTcpBinding" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"&gt; &lt;readerQuotas maxArrayLength="1000000" /&gt; &lt;security mode="None" /&gt; &lt;/binding&gt; &lt;/netTcpBinding&gt; &lt;/bindings&gt; </code></pre> <p>But the real question is: if you have large amounts of data, why aren't you making use of <a href="http://msdn.microsoft.com/en-us/library/ms731913.aspx" rel="nofollow noreferrer">WCF streaming</a>?? That's exactly what it's designed for.</p> <p><a href="http://www.haveyougotwoods.com/archive/2008/04/14/wcf-message-streaming.aspx" rel="nofollow noreferrer">http://www.haveyougotwoods.com/archive/2008/04/14/wcf-message-streaming.aspx</a></p> <p>The maxBufferSize etc. sizes are set to a fairly small value on purpose - to avoid denial of service attacks. Just cranking those up to MaxInt levels makes your server vulnerable to these DOS attacks.</p> <p><strong>UPDATE:</strong><br> Try doing this: - create a new console app - add references to <code>System.Runtime.Serialization</code> and <code>System.ServiceModel</code> - add an app.config which contains exactly what your client side config contains - put these lines of code in your console app:</p> <pre><code> class Program { static void Main(string[] args) { NetTcpBinding binding = new NetTcpBinding("unsecureNetTcpBinding"); int maxArrayLength = binding.ReaderQuotas.MaxArrayLength; long maxReceivedMessageSize = binding.MaxReceivedMessageSize; } } </code></pre> <ul> <li>run and debug - what values do you get?? I get exactly what you've entered: "1000000" for <code>binding.ReaderQuotas.MaxArrayLength</code>, "2147483647" for binding.MaxReceivedMessageSize.</li> </ul> <p>WCF does recognize and use those settings from config - 120% guaranteed. There must be something else fishy going on in your app.....</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload