本文介绍了无法使用权​​限“ *”为SSL / TLS建立安全通道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用具有SSL证书的PHP Web服务。我的.net 3.5类库在Visualstudio 2010中使用添加服务引用引用了Web服务(WCF对吗?)。

I must consume a PHP webservice which has a SSL certificate. My .net 3.5 Class library references the webservice with 'Add Service references' in Visualstudio 2010 (WCF right?).

在调用Web服务的主要方法时;

When calling the main method of the webservice I receive;

无法使用权​​限'{base_url_of_WS}'为SSL / TLS建立安全通道。

我做了很多尝试,例如

System.Net.ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
 public bool CheckValidationResult(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
    {
        return true;
    }

但这是行不通的。

*其他信息;我在自己的计算机上也安装了证书。当我在添加服务参考中使用wsdl位置时,会发生相同的错误。在尝试之前,我使用了静态wsdl。

*Extra info; When I use the wsdl location in 'Add service reference' the same error occurs. Before I tried it, I worked with a static wsdl.

推荐答案

是的,不受信任的证书可能会导致这种情况。通过在浏览器中打开websservice来查看该webservice的证书路径,然后使用浏览器工具查看该证书路径。您可能需要在调用Web服务的计算机上安装一个或多个中间证书。在您进行进一步调查时,您可能会在浏览器中看到证书错误和安装证书选项,这可能是您丢失的证书。

Yes an Untrusted certificate can cause this. Look at the certificate path for the webservice by opening the websservice in a browser and use the browser tools to look at the certificate path. You may need to install one or more intermediate certificates onto the computer calling the webservice. In the browser you may see "Certificate errors" with an option to "Install Certificate" when you investigate further - this could be the certificate you missing.

我的特殊问题是在2010年7月升级到根服务器后,缺少了Geotrust Geotrust DV SSL CA中间证书

My particular problem was a Geotrust Geotrust DV SSL CA intermediate certificate missing following an upgrade to their root server in July 2010

这篇关于无法使用权​​限“ *”为SSL / TLS建立安全通道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 13:43
查看更多