Nir*_*man 5 .net wcf soa web-config client-certificates
我尝试访问登台服务器上托管的WCF服务时收到以下错误.
"使用以下搜索条件找到多个X.509证书:StoreName'My',StoreLocation'LocalMachine',FindType'FindBySubjectName',FindValue'StagingServer001'.提供更具体的查找值."
我尝试访问以下URL并获得以上错误:
http://stagingserver001/MyService1.svc
Run Code Online (Sandbox Code Playgroud)
任何人都可以指导我如何在商店中找到证书删除它?或者我在WCF的配置中需要做哪些更改
请在下面找到从WCF服务的web.config中获取的相关代码
<behaviors>
<endpointBehaviors>
<behavior name="endpointCredentialBehavior">
<clientCredentials>
<clientCertificate findValue="SPLEBUSSTG02" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" />
<serviceCertificate>
<defaultCertificate findValue="772f3fdf2496c9750be3b0713003b47b15dfde96" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" />
<authentication certificateValidationMode="PeerOrChainTrust" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="SecurityBehavior">
<serviceMetadata httpGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceCredentials>
<serviceCertificate findValue="772f3fdf2496c9750be3b0713003b47b15dfde96" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" />
<clientCertificate>
<certificate findValue="SPLEBUSSTG02" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" />
<authentication certificateValidationMode="PeerOrChainTrust" />
</clientCertificate>
</serviceCredentials>
</behavior>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
<ServiceErrorHandler />
</behavior>
</serviceBehaviors>
</behaviors>
Run Code Online (Sandbox Code Playgroud)
Yau*_*sau 14
我认为你在证书商店有问题.请执行以下操作:

如果可能的话,摆脱重复.在其他情况下,在配置中定义FindByThumbprint条件