WCF NetTcpBinding Transport安全模式(8)2014-06-26ClientCredentialType证书验证模式---- PeerOrChainTrust验证模式PeerOrChainTrust验证模式验证证书是否位于 TrustedPeople 证书存储区中 ,或通过构建证书信任链来验证证书。如果证书通过任一验证方法,就是受信任 的。设置验证模式为“PeerOrChainTrust”的配置如以下代码所示。在服务端设置验证客户端凭据模式为“PeerOrChainTrust”:
<clientCertificate > <certificate findValue="XuanhunClient" storeLocation="CurrentUser" storeName="My" x509FindType="FindBySubjectName"/><authentication certificateValidationMode="PeerOrChainTrust" trustedStoreLocation="CurrentUser"/> </clientCertificate>
在客户端设置验证服务端凭据模式为“PeerOrChainTrust”:
<serviceCertificate > <defaultCertificatex509FindType="FindBySubjectName"storeLocation="CurrentUser"storeName="TrustedPeople"findValue="XuanhunServer"/><authentication certificateValidationMode="PeerOrChainTrust"/></serviceCertificate>
作者:玄魂出处:http://www.cnblogs.com/xuanhun/