The problem is that the NetTcpBinding server and client configuration are Inconsistent.
At least client and Server: security, whether reliable sessions are enabled, and how the transmission must be consistent
The primary transmission mode is "unsupported. Net Group frame mode is not supported."
Security and whether reliable session inconsistency is enabled causes the error "socket connection aborted." This could be caused by an error processing the message or a remote host exceeding the receive timeout or a potential network resource Problem. The local socket timeout is "00:01:59.9839991". ---> System.Net.Sockets.SocketException: The remote host forced the shutdown of an existing Connection. "
Client code Configuration
1EndpointAddress ea =Newendpointaddress (url);2 //Security None Whether reliable session is enabled false3NetTcpBinding TC =NewNetTcpBinding (securitymode.none,false)4 {5ReceiveTimeout =NewTimeSpan (Ten,Ten,Ten),6Transfermode = transfermode.streamed,///transmission Mode7MaxReceivedMessageSize =1073741824,8Sendtimeout =NewTimeSpan (0,2,0)9 };Ten returnChannelfactory<t>. CreateChannel (tc, ea);
server-side Code Configuration
1ServiceHost host = Contractdescription.getcontract (typeof (IService1));2 //Security None Whether reliable session is enabled false3NetTcpBinding TC =NewNetTcpBinding (securitymode.none,false);4 //tc. MaxReceivedMessageSize = 2147483647;5 //transmission Mode6Rch Transfermode =transfermode.streamed;7 //tc. Sendtimeout = new TimeSpan (ten, 0);8 //tc. ReceiveTimeout = new TimeSpan (0, 2, ten);9Host. AddServiceEndpoint (iType, tc,string. Concat ("net.tcp://localhost:8990/service/"));
server-side XML configuration
1 <Bindings>2 <nettcpbinding>3 <bindingname= "tcpbinding"MaxReceivedMessageSize= "2147483647"Transfermode= "Streamed" >4 <SecurityMode= "None">5 <TransportclientCredentialType= "None"/>6 <messageclientCredentialType= "None"/>7 </Security>8 <reliablesessionenabled= "false"/>9 <ReaderquotasmaxDepth= " +"Maxstringcontentlength= "2147483647"Maxarraylength= "2147483647"Maxbytesperread= "4096"Maxnametablecharcount= "16384"/>Ten </binding> one </nettcpbinding> a </Bindings>
//<security mode= "none" >//set Transport Security None
<reliablesession enabled= "false"/>//do not enable reliable session false
Transfermode transmission mode
The. Net Group frame mode that is in use is not supported. For more information, See server logs--is your solution