visual-studio “我的”证书存储去哪儿了?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1786019/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 11:15:07  来源:igfitidea点击:

Where did 'My" certificate store go?

visual-studiocertificatewifcertificate-store

提问by blowdart

Because I'm awesome I'm trying to run the latest WIF demo app using VS2k10 B2 on my 7 boxen... 64bit of course (my neckbeard is strong) I'm having a problem getting it running.

因为我太棒了,所以我正在尝试在我的 7 盒机上使用 VS2k10 B2 运行最新的 WIF 演示应用程序......当然是 64 位(我的颈须很强)我在运行时遇到了问题。

Part of the whole demo thing requires I install some certificates on the local machine. Problem is that they ask me to install some of the website certs into a certificate store called LocalMachine/My. Well, there doesn't appear to be any /Myanymore. There appears a suspiciously similar store called Personal, but the app doesn't work if I install the certs there and change the configurations to look in LocalMachine/Personal.

整个演示的一部分需要我在本地机器上安装一些证书。问题是他们要求我将一些网站证书安装到名为LocalMachine/My的证书存储中。好吧,似乎没有任何/My了。出现了一个可疑的类似商店Personal,但如果我在那里安装证书并更改配置以查看LocalMachine/Personal,该应用程序将无法运行。

If I install the certs in TrustedPeople(it's mentioned as a valid location by the exception that was thrown when I attempted to use Personal), is that sufficient? Would doing this be considered bad form on a production machine?

如果我在TrustedPeople 中安装证书(当我尝试使用 Personal 时抛出的异常将其称为有效位置),这是否足够?在生产机器上这样做会被认为是不好的形式吗?



The Windows Identity Foundation test project can be found at: http://claimsbasedwpf.codeplex.com

可以在以下位置找到 Windows Identity Foundation 测试项目:http: //claimsbasedwpf.codeplex.com

The exception:

例外:

Property name: 'certificateReference' Error: 'ID1025: Cannot find a unique certificate that matches the criteria. StoreName: 'My' StoreLocation: 'LocalMachine' X509FindType: 'FindBySubjectDistinguishedName' FindValue: 'CN=busta-rpsts.com''

属性名称:'certificateReference' 错误:'ID1025:找不到符合条件的唯一证书。StoreName:'我的'StoreLocation:'LocalMachine' X509FindType:'FindBySubjectDistinguishedName' FindValue:'CN=busta-rpsts.com''

回答by blowdart

The .NET refers to the stores differently than windows does. Which is a right pain in the butt. When .NET talks about the My store Windows refers to it as the Personal store.

.NET 指代商店的方式与 Windows 不同。这是正确的屁股痛。当 .NET 谈到我的商店时,Windows 将其称为个人商店。

Where you put certs depends on their purpose. The Personal store is for certificates you will use, where you have both the public and private key. The Trusted People store is for certificates where you (normally) only have the public key and want to add an explicit trust for those certificates.

将证书放在哪里取决于它们的用途。Personal 存储用于存放您将使用的证书,其中您拥有公钥和私钥。Trusted People 存储适用于您(通常)只有公钥并希望为这些证书添加显式信任的证书。

Also remember if you are using a certificate to encrypt your user account must have access to the private key. For certificates installed in LocalMachine/My then administrators will but, for example, NETWORK SERVICE will not. You will need to specifically grant access to the private key.

还请记住,如果您使用证书来加密您的用户帐户,则必须有权访问私钥。对于安装在 LocalMachine/My 中的证书,管理员会,但例如,网络服务不会。您需要专门授予对私钥的访问权限。

回答by Nigel Shaw

You need to install the certificates in the Local Computer store not the Current User store. If you double-click them to install, they go in Current User. Use the mmc snap-in to install them in Local Computer. Also if you have access permissions run VS as Administrator.

您需要在本地计算机存储而不是当前用户存储中安装证书。如果您双击它们进行安装,它们将进入当前用户。使用 mmc 管理单元将它们安装在本地计算机中。此外,如果您有访问权限,请以管理员身份运行 VS。