The. Net Group frame mode that is in use is not supported. For more information, See server logs--is your solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.