• 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

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 4 views
0 votes
1 answer 52 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 12 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 121 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 96 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
0 votes
1 answer 250 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 157 views
Problem : I can push by clone project using ssh but it is not working for me getting following error server certificate verification failed. cafile: /etc/ssl/certs/ca-certificates.crt crlfile: none
asked Nov 12, 2019 peterlaw 6.9k points
0 votes
1 answer 100 views
Problem : I am trying to use the WCF4.0 template -REST. Also I am trying to make the method that uploads a file using the stream. The problem always occur at below line of code: Stream myserverStream = myrequest.GetRequestStream() ... connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
asked Dec 10, 2019 alecxe 7.5k points
0 votes
1 answer 26 views
Problem: I am very beginner to xcode and provisioning profile. I am facing the below error message: A valid provisioning profile for this executable was not found. In spite of having the valid provisioning profile which as far as I considered it matches a bundle ... signing lists, either for the target or for the project. Can someone offer any expert suggestions on my above xcode related error?
asked Jul 20, 2020 Raphael Pacheco 4.9k points