Questions tagged «winhttp»

8
如何授予ASP.NET访问证书存储区中证书的私钥的权限?
我有一个ASP.NET应用程序,可以访问证书存储区中证书的私钥。在Windows Server 2003上,我可以使用winhttpcertcfg.exe授予对NETWORK SERVICE帐户的私钥访问权限。如何在IIS 7.5网站中的Windows Server 2008 R2上授予访问证书存储区(本地计算机\个人)中证书的私钥的权限? 我尝试授予对“每个人”,“ IIS AppPool \ DefaultAppPool”,“ IIS_IUSRS”以及我可以使用证书MMC(Server 2008 R2)找到的所有其他安全帐户的完全信任访问权限。但是,以下代码演示该代码无权访问随私钥一起导入的证书的私钥。每次访问私钥属性时,代码都会引发错误。 Default.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Import Namespace="System.Security.Cryptography.X509Certificates" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Repeater ID="repeater1" runat="server"> …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.