【发布时间】:2013-01-23 18:46:38
【问题描述】:
使用 x509 证书对客户端进行身份验证时,我的 Web 服务出现以下错误。
X509Certificate2 Clnt = new X509Certificate2 (HttpContext.Current.Request.ClientCertificate.Certificate);
错误是 System.Web.Services.Protocols.SoapException:服务器无法处理请求。 ---> System.Security.Cryptography.CryptographicException:m_safeCertContext 是无效句柄。 在 System.Security.Cryptography.X509Certificates.X509Certificate.get_Issuer() 在 c:\MyWorkSpace\SecuredWS\App_Code\Service.cs:line 40 中的 Service.HelloWorld() --- 内部异常堆栈跟踪结束
任何人都可以解释一下为什么我将 m_safeCertContext 设为 null。
问候
【问题讨论】: