title: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine
body: <p>I'm writing an upload control that works with a WCF service and when I'm trying to upload files over 1MB I'm getting this Error:</p>
  
  <pre><code>{System.IO.IOException: Unable to write data to the transport connection: 
   An established connection was aborted by the software in your host machine. 
  ---&gt; System.Net.Sockets.SocketException: An established connection was aborted by the 
       software in your host machine
  at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
  at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
  --- End of inner exception stack trace ---
  at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
  at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
  at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
  at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 size)}
  </code></pre>
  
  <p>I don't know if this is related to json max length parameter or not.
  I know that in web applications I can add this to the web.config file</p>
  
  <pre><code>&lt;system.web.extensions&gt;
  &lt;scripting&gt;
    &lt;webServices&gt;
      &lt;jsonSerialization maxJsonLength="50000000"/&gt;
    &lt;/webServices&gt;
  &lt;/scripting&gt;
  </code></pre>
  
  <p></p>
  
  <p>But I'm new to WCF and have no idea how to handle it here...</p>