在IIS CurrentUser / Personal Store中安装证书 [英] Install Certificate in IIS CurrentUser/Personal Store
问题描述
我们在azure上托管一些网站,在天蓝色的vm上托管一些网站。我们希望尽可能多地重用代码。在azure应用程序服务(网站)中,可以使用以下代码段在CurrentUser / Personal商店中找到已安装的证书:
We are hosting some websites on azure and some on a vm in azure. We want to reuse as much code as possible. In azure application services (websites) the installed certificates can be found in the CurrentUser/Personal store using this snippet:
using (var certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser))
{
certStore.Open(OpenFlags.ReadOnly);
var certCollection =
certStore.Certificates.Find(
X509FindType.FindByThumbprint,
thumbprint,
false);
}
我想在IIS上使用完全相同的代码片段。应用程序池标识设置为 ApplicationPoolIdentity
。我已经尝试在各个地方安装证书,但我无法检索所需的证书...我还尝试在LocalComputer / Personal商店中安装证书并授予私钥的权限
I want to use the exact same snippet on IIS as well. The application pool identity is set to ApplicationPoolIdentity
. I already tried to install the certificate in various places but I am not able to retrieve the desired certificate ... I have also tried to install the certificate in the LocalComputer/Personal store and grant permissions to the private key
我应该在MMC管理单元中使用哪个标识?我在那里找不到 ApplicationPoolIdentity
用户帐户。只有应用程序标识
帐户无法解决我的问题......
Which Identity shall I use in the MMC Snap-In? I cannot find the ApplicationPoolIdentity
user account there. There is only an Application Identity
account which does not solve my issue ...
推荐答案
目前我正在创建一个新用户,将证书添加到用户我的
商店并将该用户用作应用商店标识。不过,其他解决方案非常受欢迎!
For the time being I am creating a new user, adding the certificate to the users My
store and using that user as app pool identity. Still, other solutions are very welcome!
这篇关于在IIS CurrentUser / Personal Store中安装证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!