【发布时间】:2015-08-04 11:08:02
【问题描述】:
在 IIS 7.5 中创建自签名 ssl 之后,我通过 Wcf 创建了自定义身份验证
并在 web.config 中使用以下代码
<serviceCertificate findValue="CN = srv-erp"/>
还有这个
<serviceCertificate findValue="CN = srv-erp"
storeLocation="LocalMachine"
x509FindType="FindBySubjectName"
storeName="My"/>
我也使用了 FindBySerialNumber。
但他们没有工作,我得到了这个错误
无法使用以下搜索条件找到 X.509 证书:StoreName 'My'、StoreLocation 'LocalMachine'、FindType 'FindBySubjectDistinguishedName'、FindValue 'CN = srv-erp'。
感谢您的帮助
【问题讨论】:
-
打开mmc,为计算机账户添加证书管理单元,在个人节点检查你的证书是否安装。获取它的名称并尝试输入 findValue。
-
我认为您不需要包含 cn=,只需将 srv-erp 添加为 findValue
标签: web-services wcf iis iis-7