title: wcf streaming large files out of memory error
body: <p>I have a wcf service which I user for transfering files. im using basicHttpBinding Streamed mode on. I configured some values in both web.config and app.config(client side) properly(I guess) but it doesn't work as I expect. It can send and receive up to 1,610,611,200 bytes which is nearly 1.5 gb. everytime i upload a file larger than this size to server, at this limit my service method throws the "An exception has been thrown when reading the stream." exception. and when i try to download a file larger than this size then it throws the "Exception of type 'System.OutOfMemoryException' was thrown." exception. Here are my config files related parts. Hope someone can give me some point to figure out this problem.</p>
  
  <pre><code> &lt;basicHttpBinding&gt; (web config)
      &lt;binding name="StreamServiceHttpBinding" receiveTimeout="01:00:10" sendTimeout="03:00:30" maxBufferPoolSize="2147483647"
        maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
        transferMode="Streamed"&gt;
        &lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
          maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt;
      &lt;/binding&gt;
    &lt;/basicHttpBinding&gt;
  
   &lt;basicHttpBinding&gt; (app config)
      &lt;binding name="BasicHttpBinding_IStreamService" receiveTimeout="01:00:10"
        sendTimeout="03:00:30" maxBufferPoolSize="2147483647" maxBufferSize="2147483647"
        maxReceivedMessageSize="2147483647" transferMode="Streamed"&gt;
        &lt;readerQuotas maxDepth="128" maxStringContentLength="2147483647"
          maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt;
      &lt;/binding&gt; 
    &lt;/basicHttpBinding&gt;
  </code></pre>
  
  <p>btw I've got 8gb of ram at server and 8gb of ram at client too. since it is streamed transferMode it doesn't necessarily use the rams but im thinking now if it's a memory problem :(
  any help would be appreciated.</p>