找不到 X.509 证书 StoreName 'My'、StoreLocation 'LocalMachine'、FindType 'FindBySubjectName'、FindValue ''

问题描述 投票:0回答:1

我已将证书添加到受信任的根证书颁发机构。 但当我启动 REST 服务时,我的代码仍然给出此错误。

错误:

 Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindBySubjectName', FindValue '<certificate name>'.

在 Web.config 中,我添加了以下标签:

<serviceCertificate findValue="<certificate name>"
                    x509FindType="FindBySubjectName"
                    storeLocation="LocalMachine" />
</serviceCredentials>

如果我做错了,请告诉我?

iis certificate x509
1个回答
0
投票

转到“管理计算机证书”。单击该按钮,您应该会看到 “certlm” 窗口 展开个人文件夹,然后展开证书文件夹,然后查找您在 web.config 中提供的证书。我认为您的证书名称错误,这就是您收到此错误的原因。

我的 web.config 设置是

在我的“certlm”窗口中,我获得了带有设备名称的证书。DEVELOPMENT。看下图我的证书信息enter image description here

如果此解决方案可以帮助您解决您的问题,请将其标记为答案

© www.soinside.com 2019 - 2024. All rights reserved.