Web services 证书问题403.7
因此,我有以下系统:有一个客户端应用程序,它请求服务如下:Web services 证书问题403.7,web-services,.net-3.5,x509certificate,windows-7-x64,client-certificates,Web Services,.net 3.5,X509certificate,Windows 7 X64,Client Certificates,因此,我有以下系统:有一个客户端应用程序,它请求服务如下: blar.ServiceSecurity wsSecurity = new blar.ServiceSecurity(); wsSecurity.Url = this.tURL + "Security.asmx"; CookieContainer cc = new CookieContainer(); wsSecurity.CookieContainer = cc; wsSecurity.ClientCertificates.Add(X
blar.ServiceSecurity wsSecurity = new blar.ServiceSecurity();
wsSecurity.Url = this.tURL + "Security.asmx";
CookieContainer cc = new CookieContainer();
wsSecurity.CookieContainer = cc;
wsSecurity.ClientCertificates.Add(X509Certificate.CreateFromCertFile(certPath));
blar.LoginResult lr = wsSecurity.Login(login, password);
然后,位于this.tURL+“Security.asmx”
的登录
方法的web服务必须从以下位置获取该ClientCertificate(certPath):
用它做点什么
有两个问题:如果IIS的配置显示
需要客户端证书
,则调用登录函数时会出现403.7错误如果IIS的配置显示
接受客户端证书
,我会得到加密异常“m_safeCertContext是无效句柄”
但只有当客户端在Windows 7 x64上运行时,这些问题才会发生,当客户端在Windows XP或Windows Server 2003上启动时,甚至运行正常
ca安装在两台机器上,所有测试用例中的配置似乎完全相同,所以我的问题是‘到底是什么?’我看不出您的代码或配置有任何直接的错误,因此您可能会发现这些工具有助于您自己解决问题:
您还可以在Vista/Windows7x86上进行测试吗?XP/2003之后,证书API发生了巨大的变化;在Vista/7 x86上进行测试有助于确定这是64位问题还是其他问题。
Context.Request.ClientCertificate.Certificate;