• Register
0 votes
222 views

Problem :

I really thought that I had this issue fixed, but it was just disguised before.

I have the WCF service hosted in my IIS 7 using HTTPS. When I try to browse to this site in the Internet Explorer, it works like a charm, As I have already added the certificate to the local root certificate authority store.

I want to developing on 1 machine, so the client and server are the same machine. The certificate is self-signed directly from the IIS 7 management snap in.

But I continually get below error now:

Could not establish trust relationship for the SSL/TLS secure channel with authority.

Whenever I try to call it from the client console.

I manually gave myself the permissions and network service to my certificate, using findprivatekey and also using cacls.exe.

I just tried to connect it to the service using SOAPUI, and that works, so that must be an issue in my client application, which is the code based on what used to work with http.

Where else should I look as I am completely exhausted I tried all possibilities as to why I am unable to connect?

7.5k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

A one line solution to your problem. Please add below code anywhere before calling the server on your client side:

System.Net.ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };

This must only be used for the testing purposes as the client will skip SSL/TLS security checks.

38.6k points

Related questions

0 votes
1 answer 33 views
0 votes
1 answer 968 views
968 views
Problem: I am trying to consume a PHP webservice which has the SSL certificate. I have the .net 3.5 Class library it references the webservice with a 'Add Service references' in Visualstudio 2010 If I try calling the main method of my webservice then I ... SslPolicyErrors sslPolicyErrors) { return true; } But somehow it is not working. Also I have already a certificate installed on my own pc.
asked Aug 12, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 5 views
5 views
Problem: Give me a solution please : Could not establish trust relationship for the ssl tls.
asked Jun 25 Aurelia Maja 78.4k points
0 votes
1 answer 22 views
22 views
Problem: Does anyone have an answer to this : Could not establish secure channel for ssl tls?
asked May 26 Priscilla Gurpreet 74.7k points
0 votes
1 answer 14 views
14 views
Problem: Could not create ssl tls secure channel.
asked Jul 21 Aurelia Maja 78.4k points
0 votes
1 answer 12 views
12 views
Problem : Could not create ssl/tls secure channel.
asked Jul 18 Sifat55 108k points
0 votes
1 answer 8 views
8 views
Problem: Could not create ssl tls secure channel web service.
asked Jun 27 akhi 125k points
0 votes
1 answer 8 views
8 views
Problem: Is this something that happens to other people : The request was aborted could not create ssl/tls secure channel?
asked Jun 21 akhi 125k points
0 votes
1 answer 38 views
38 views
Problem: I have been trying but no luck with this : Invoke-webrequest : the request was aborted: could not create ssl/tls secure channel.
asked Jun 13 asha 121k points
0 votes
1 answer 22 views
22 views
Problem: Could not create ssl/tls secure channel powershell? Please give me an answer to this.
asked May 22 Florina Gulnar 106k points