标签:get entity service name value 证书 find 为我 ida
1.先在服务器添加证书 makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=TestServer -sky exchange -pe
2.设置证书的权限,everyone添加读取权限
3.服务器端配置
<security mode="Message"> <message clientCredentialType="Certificate" /> </security> <identity> <certificateReference storeName="My" x509FindType="FindBySubjectName" findValue="SkywindServer" /> </identity> <clientCertificate> <authentication certificateValidationMode="None" />这里设置成None因为我们创建的是不受信任的证书 </clientCertificate> <serviceBehaviors> <behavior name="BasicServiceBehavior"> <serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="false" /> <serviceCredentials> <clientCertificate> <authentication certificateValidationMode="None" /> </clientCertificate> <serviceCertificate findValue="SkywindServer" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" /> </serviceCredentials> </behavior> </serviceBehaviors>
4.客户端配置
<behaviors> <endpointBehaviors> <behavior name="CustomBehavior"> <clientCredentials> <!--客户端证书--> <clientCertificate findValue="Skywind" storeName="My" storeLocation="LocalMachine" x509FindType="FindBySubjectName"/> <serviceCertificate> <authentication certificateValidationMode="None"/> </serviceCertificate> </clientCredentials> </behavior> </endpointBehaviors> </behaviors>
标签:get entity service name value 证书 find 为我 ida
原文地址:https://www.cnblogs.com/renfeng/p/12988031.html