I am using a NetTCP duplex binding to send a document from the server to the client as byte[]. When this byte[] is pretty large (say 10Meg) the server quits by giving
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
Smaller messages for example 1 mb does work well. This is the binding in my web.config
<bindings>
<netTcpBinding>
<binding name="InsecureTcp" receiveTimeout="0:10:00" sendTimeout="0:05:00" portSharingEnabled="true" openTimeout="0:0:02" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647"/>
<security mode="None"/>
<reliableSession enabled="true" ordered="true" inactivityTimeout="0:00:05"/>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
Update 1 It looks like that the Reliable Session kills the connection by suspecting inactivity. The push of the document to the client takes more than 5 seconds, so the channel is faulted by (I suppose) the client. However: I have this inactivityTimeout of 5 seconds, to get almost immediately notified when the connection drops, so I can instantiate a new connection to the server.
It looks like these two requirements fight each other