• Register
0 votes

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

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 3 views
0 votes
1 answer 16 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 Raphael Pacheco 4.9k points
1 vote
1 answer 10 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 Raphael Pacheco 4.9k points
1 vote
1 answer 71 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 61 views
Problem : I want to deploy my ASP.NET application. I have tried deploying my site to IIS, but when I visit it with the browser, it gives me following error : Server Error 500 - Internal server error. There is a problem with the resource you are looking for ... error: The page cannot be displayed because an internal server error has occurred. I want to see the actual issue behind my server error?
asked Dec 7, 2019 alecxe 7.5k points