Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Web services 证书问题403.7_Web Services_.net 3.5_X509certificate_Windows 7 X64_Client Certificates - Fatal编程技术网

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安装在两台机器上,所有测试用例中的配置似乎完全相同,

所以我的问题是‘到底是什么?’

我看不出您的代码或配置有任何直接的错误,因此您可能会发现这些工具有助于您自己解决问题:

  • (对于IIS 7,请参阅)
  • (如何)

  • 您还可以在Vista/Windows7x86上进行测试吗?XP/2003之后,证书API发生了巨大的变化;在Vista/7 x86上进行测试有助于确定这是64位问题还是其他问题。
    Context.Request.ClientCertificate.Certificate;