在 Service Fabric 应用程序中访问 X509 Store
Access X509 Store in Service Fabric application
我已将我的证书放在 LocalMachine/My
中并希望这样访问它们:
var store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
var x509Certificate2Collection = store.Certificates.Find(X509FindType.FindByThumbprint, certThumbprint, false);
var myCert = x509Certificate2Collection.Count > 0 ? x509Certificate2Collection[0] : null;
store.Close();
这在我的本地集群上运行良好,但在我的独立集群上却不行。
我尝试访问的证书在私钥的 ACL 中有 NETWORK SERVICE
。
我认为这是一个权限问题。我在这里遗漏了什么明显的东西吗?
如何调试我的独立集群?
以上代码运行良好。我的问题是我的指纹是 ""
因为我没有正确设置我的配置覆盖!
我已将我的证书放在 LocalMachine/My
中并希望这样访问它们:
var store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
var x509Certificate2Collection = store.Certificates.Find(X509FindType.FindByThumbprint, certThumbprint, false);
var myCert = x509Certificate2Collection.Count > 0 ? x509Certificate2Collection[0] : null;
store.Close();
这在我的本地集群上运行良好,但在我的独立集群上却不行。
我尝试访问的证书在私钥的 ACL 中有 NETWORK SERVICE
。
我认为这是一个权限问题。我在这里遗漏了什么明显的东西吗?
如何调试我的独立集群?
以上代码运行良好。我的问题是我的指纹是 ""
因为我没有正确设置我的配置覆盖!