无法找到发布后的X.509证书证书

2023-09-03 23:07:36 作者:习惯了与影子对话

我建立一个WCF服务中的这篇文章和面临的麻烦与X.509证书。

I am building a WCF service as in this article and facing trouble with X.509 certificate.

当我调试,一切正常。当我发布并运行应用程序,我收到错误消息:

When I debug, everything is OK. When I publish and run the application, I receive the error:

使用下面的搜索条件找不到X.509证书。STORENAME我的,的StoreLocation的currentUser,FindTypeFindBySubjectName,FindValueWCFServer

Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType 'FindBySubjectName', FindValue 'WCFServer'.

哪些故障排除步骤我可以采取?

What troubleshooting steps can I take?

该服务器是IIS 5.1在Windows XP SP3

The server is IIS 5.1 on Windows XP SP3

推荐答案

在猜测:这似乎是看在的currentUser店,这是与您的用户帐户。你的IIS实例可能无法以该用户账户,在这种情况下,它会找不到证书运行。你需要使用全局存储,或者安装在你的IIS服务的用户帐户的证书来解决这个问题。

At a guess: it seems to be looking in the "CurrentUser" store, which is tied to your user account. Your IIS instance might not be running under that user account, in which case it won't find the cert. You'd need to use the global store, or to install the cert under your IIS service user's account to fix the problem.