问题描述
我已经在用户PC中安装了 ssl证书
。而且,我还将该证书导入到 受信任的根证书颁发机构
的本地计算机下。我正在尝试使用网络服务
。在我的代码中,我将证书附加如下。
webservice.ClientCertificates.Add(X509Certificate.CreateFromCertFile(certPath));
但是我遇到了以下错误。
可能是什么问题?我正在使用.Net Framework 2.0。因此,无法使用WCF。谢谢。
这意味着
- 可能是您安装了错误的证书。
- 您将证书安装到了错误的位置。
- 启动IE即可。
- 判断是否已正确安装客户端证书的简单方法。 >打开工具| Internet选项。
- 在内容选项卡中,单击证书按钮。
然后您应该会看到Personal中的证书(读取证书路径并查看它是否包含错误),并将能够在WinForms应用程序中使用它。
I have already installed the ssl cert
in user PC. And, I also imported the cert under Local computer of Trusted Root Certification Authorities
. I am trying to consume the web servcie
. In my code I attach the cert as below.
webservice.ClientCertificates.Add(X509Certificate.CreateFromCertFile(certPath));
But I got the following error.
What could be the issue? I'm using .Net Framework 2.0. So, not able to use WCF. Thanks.
That means,
- probably you have the wrong certificates installed.
- you installed the certificates to the wrong place.
An easy way to tell if you have a client certificate installed properly is
- launch IE.
- Open Tools | Internet options.
- In Content tab, click Certificates button.
Then you should see the cert in Personal (read cert path and see whether it contains errors), and will be able to use it in your WinForms application.
这篇关于在LocalMachine存储或CurrentUser存储中找不到证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!