我们正在使用自定义绑定与 TCP 和使用证书安全。 WCF服务器位于负载平衡服务器之后。
我们在主机服务器上收到以下异常。
没有任何渠道可以接受带有操作的消息' {MethodName}' 。
在客户端,我们得到了这些例外
这是客户端的绑定
<binding name="CustomBinding" closeTimeout="00:02:00" openTimeout="00:02:00" sendTimeout="00:02:00">
<transactionFlow/>
<security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
<secureConversationBootstrap authenticationMode="CertificateOverTransport"/>
</security>
<binaryMessageEncoding compressionFormat="GZip" />
<sslStreamSecurity requireClientCertificate="true"/>
<tcpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<connectionPoolSettings groupName="GN" />
</tcpTransport>
</binding
这是服务器端绑定
<binding name="CustomBinding" receiveTimeout="00:02:00" sendTimeout="00:02:00">
<transactionFlow/>
<security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
<secureConversationBootstrap authenticationMode="CertificateOverTransport"/>
</security>
<binaryMessageEncoding compressionFormat="GZip" />
<sslStreamSecurity requireClientCertificate="true"/>
<tcpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<connectionPoolSettings maxOutboundConnectionsPerEndpoint="500" />
</tcpTransport>
</binding>
以下是终点行为
<endpointBehaviors>
<behavior name="CustomBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483646"/>
<clientCredentials>
<clientCertificate findValue="" x509FindType="FindByThumbprint" storeLocation="LocalMachine" />
<serviceCertificate>
<authentication certificateValidationMode="PeerOrChainTrust"/>
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
以下是服务行为
<behavior name="CustCertBehavior">
<serviceCredentials>
<serviceCertificate findValue="" x509FindType="FindByThumbprint" storeLocation="LocalMachine" />
<clientCertificate>
<authentication certificateValidationMode="PeerOrChainTrust" />
</clientCertificate>
</serviceCredentials>
</behavior>
有关如何解决此问题的任何建议?