Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not establish secure channel for SSL/TLS with authority '*'

Tags:

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?).

When calling the main method of the webservice I receive;

Could not establish secure channel for SSL/TLS with authority '{base_url_of_WS}'.

I tried a lot, like

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

But It wouldn't work. Also I have the certificate installed on my own machine.

*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.

alt text

like image 669
Casper Broeren Avatar asked Dec 16 '10 17:12

Casper Broeren


People also ask

How do you fix could not establish secure channel for SSL TLS with authority?

A common reason you may receive the error Could not establish trust relationship for the SSL/TLS secure channel is because the SSL certificate isn't trusted. If the SSL certificate is not trusted, you will need to install the SSL certificate's root certificate.

How do you establish trust relationship for SSL TLS secure channel?

Go to Central Administration =>Security =>Manage Trust. In the ribbon interface, go to Trust Relationships Tab =>Manage group =>Click on New button. In the Root Certificate to trust relationship section, click on Browse. Select the certificate that we have exported.

What is SSL TLS secure channel?

SSL/TLS creates a secure channel between a users' computer and other devices as they exchange information over the internet, using three main concepts: encryption, authentication, and integrity to accomplish this. Encryption hides data being transferred from any third parties.

What is SSL certificate for website?

An SSL certificate is a bit of code on your web server that provides security for online communications. When a web browser contacts your secured website, the SSL certificate enables an encrypted connection. It's kind of like sealing a letter in an envelope before sending it through the mail.


1 Answers

This was exact the problem I was facing. At some other article I got a hint to change the configuration. For me this works:

<bindings>   <basicHttpBinding>     <binding name="xxxBinding">       <security mode="Transport">         <transport clientCredentialType="Certificate"/>       </security>     </binding>   </basicHttpBinding> </bindings> 
like image 187
MICHA Avatar answered Oct 06 '22 01:10

MICHA