• Register
0 votes
144 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?

6 5 3
7,540 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.

9 7 4
38,600 points

Related questions

0 votes
1 answer 10 views
0 votes
1 answer 207 views
207 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
1 vote
1 answer 23 views
23 views
Problem: I am having fundamental knowledge on C#. Currently I am unable to connect to the HTTPS server with the use of WebRequest as I am facing below error message: "The request was aborted: Could not create SSL/TLS secure channel." I understand that my ... my server never really validates a certificate and it fails with a above error. Kindly guide me in fixing above certificate related error.
asked Jun 30, 2020 Raphael Pacheco 4.9k points
1 vote
1 answer 168 views
168 views
Problem : I am trying to develop the WCF web service in VS2010. My web service works good in my VS2010, I have also added the web service reference to the project in this project, everything works great, call of methods, good. But when I try to deploy my web service I ... Web.Debug.config. I am very new to the WCF web services, So what do I need to deploy to make my web service work correctly?
asked Dec 28, 2019 alecxe 7.5k points
0 votes
1 answer 5 views
5 views
Problem: I need someone to understand this problem and find out the solution. Thanks .the certificate authority is invalid or incorrect
asked Mar 22 Ifra 24.4k points
0 votes
1 answer 399 views
399 views
Problem : I have a problem in IE9 with the security certificate. When I went to specific address I got below error “There is a problem with this website's security certificate.” How can I avoid the reappearance of this window?
asked Jan 28, 2020 jwilliam 3.9k points
0 votes
1 answer 8 views
8 views
Problem: The service call returns the message: System.ServiceModel.ServiceActivationException: The requested service, 'http://localhost:83/ABCStaticData/StaticDataService.svc' could not be activated. See the server's diagnostic trace logs for more information.
asked Mar 20 ummesalma 24.5k points
0 votes
1 answer 8 views
8 views
Problem: After debugging and installing windows service in windows 8 I have an error when I try to start a windows service:"The Windows could not start service on local computer Error 5 Access is denied"
asked Mar 8 ummesalma 24.5k points
0 votes
1 answer 5 views
5 views
Problem: I need assistance in resolving this problem in Safari cannot open the page because it could not establish a secure connection to the server?
asked 6 days ago tuhin1 48.4k points
0 votes
1 answer 5 views
5 views
Problem: Need your help to solve this >'could not establish a secure connection to the server' ?
asked Mar 17 sadi1982 36.3k points