Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF Streaming File Upload 300MB +
    primarykey
    data
    text
    <p>I'm having a little trouble with WCF streaming a file. I am able to stream files to the server that are less than 300 MB, but when I try a file 300 MB or more, I get an error around 60% in saying "An established connection was aborted by the software in your host machine". This error sounds like I'm closing the connection before the file is finished, but I can't find it.</p> <p>The client code I have opens the connection, calls the Upload Method, waits for the return, then closes the connection. This works fine for small files.</p> <p>The WCF server is hosted in a Windows Service, using the net.tcp binding. I've tried changing the buffer sizes etc, but still no luck.</p> <p>I'm looking for some assistance in tracking down this issue.</p> <p>Server Side Binding:</p> <pre><code> NetTcpBinding tcp = new NetTcpBinding(SecurityMode.None); tcp.SendTimeout = TimeSpan.FromMinutes(10); tcp.ReceiveTimeout = TimeSpan.FromMinutes(10); tcp.MaxBufferSize = 65536; // 16384; tcp.MaxBufferPoolSize = 204003200; // 655360; tcp.MaxReceivedMessageSize = 204003200; // 2147483647; tcp.TransferMode = TransferMode.Streamed; tcp.ReaderQuotas = new XmlDictionaryReaderQuotas() { MaxArrayLength = 2147483647 }; </code></pre> <p>Client Side Binding:</p> <pre><code> NetTcpBinding tcp = new NetTcpBinding(SecurityMode.None); tcp.SendTimeout = TimeSpan.FromMinutes(10); tcp.ReceiveTimeout = TimeSpan.FromMinutes(10); tcp.MaxBufferSize = 65536; // 16384; tcp.MaxBufferPoolSize = 204003200; // 655360; tcp.MaxReceivedMessageSize = 204003200; // 2147483647; tcp.TransferMode = TransferMode.Streamed; tcp.ReaderQuotas = new XmlDictionaryReaderQuotas() { MaxArrayLength = 2147483647 }; </code></pre> <p>Class I use for the File Stream:</p> <pre><code> [MessageContract] public class DataFileStream { [MessageHeader(MustUnderstand = true)] public String ID { get; set; } [MessageHeader(MustUnderstand = true)] public String FileName { get; set; } [MessageHeader(MustUnderstand = true)] public long FileSize { get; set; } [MessageBodyMember(Order = 1)] public Stream StreamData { get; set; } } </code></pre> <p>And the errors I receive:</p> <p>Exception: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:48:35.9230000'</p> <p>Inner Exception: The write operation failed, see inner exception.</p> <p>Inner Exception: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:48:35.9230000'.</p> <p>Inner Exception: An established connection was aborted by the software in your host machine</p> <p>Thanks for the help in advance. </p>
    singulars
    1. This table or related slice is empty.
    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.
 

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