title: WCF And Large Amounts Of Data
body: <p>I want to be able to send large amount of data to my <code>WCF service</code>, what i am sending is <code>List&lt;byte[]&gt;</code> that the client received and currently my application get an error that socket aborted.</p>
  
  <p>so i found ths thread: <a href="http://geekswithblogs.net/tmurphy/archive/2011/08/15/sending-large-arrays-with-wcf.aspx" rel="nofollow">http://geekswithblogs.net/tmurphy/archive/2011/08/15/sending-large-arrays-with-wcf.aspx</a></p>
  
  <p>this is how my connection is estanlished:</p>
  
  <pre><code>string urlService = "net.tcp://localhost:8000/myApp";
  ServiceHost host = new ServiceHost(typeof(pp.classes.service1));
  host.Opening += new EventHandler(host_Opening);
  host.Opened += new EventHandler(host_Opened);
  host.Closing += new EventHandler(host_Closing);
  host.Closed += new EventHandler(host_Closed);
  
  NetTcpBinding tcpBinding = new NetTcpBinding();
  tcpBinding.TransactionFlow = false;
  tcpBinding.Security.Transport.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;
  tcpBinding.Security.Transport.ClientCredentialType = TcpClientCredentialType.Windows;
  tcpBinding.Security.Mode = SecurityMode.None; // &lt;- Very crucial
  pp.classes.service1 ser = new pp.classes.service1();
  host.AddServiceEndpoint(typeof(pp.classes.IService1), tcpBinding, urlService);
  ServiceMetadataBehavior metadataBehavior;
  metadataBehavior = host.Description.Behaviors.Find&lt;ServiceMetadataBehavior&gt;();
  if (metadataBehavior == null)
  {
      // Create the proxy object that is generated via the svcutil.exe tool
      metadataBehavior = new ServiceMetadataBehavior();
      metadataBehavior.HttpGetUrl = new Uri("http://localhost:8001/myApp");
      metadataBehavior.HttpGetEnabled = true;
      metadataBehavior.ToString();
      host.Description.Behaviors.Add(metadataBehavior);
      string urlMeta = metadataBehavior.HttpGetUrl.ToString();
  }
  
  host.Open();
  </code></pre>
  
  <p>I try to find <code>maxReceivedMessageSize</code>, <code>maxStringContentLength</code> and <code>maxArrayLength</code> properties but i found only <code>maxReceivedMessageSize</code> (i am working without app.config file)</p>