Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF : Could not establish trust relationship for the SSL/TLS secure channel with authority error

I have a client site that when a button is clicked it calls a wcf web service. The client site is http, while the url for the web service is https and requires a certificate. I have a valid signed private key certificate I am using.

Everything works fine on my localhost; however, after deploying to a windows 2003 server running iis 6, I get the below error when the web service is called:

Could not establish trust relationship for the SSL/TLS secure channel with authority "host's url"

I added the cert to the store, using same web.config that works locally. I have validated that the web service call finds and sets the valid X509Certificate.

Not sure what I am missing, and I don't want to override the servicepiont manager to return true every time.

Any ideas or things I might looks into?

like image 887
Popo Avatar asked Dec 25 '22 18:12

Popo


1 Answers

Found the problem.

The root certificate which the host of the web service uses was not trusted by my server. (not sure why it was on my local machine and not my server). I found this out by opening the host's url in a web browser from the server to view their wsdl and got the security warning.

Remedy: went to the issuer's site downloaded their root cert and added to my trusted root certifcation authorities.

Bam, it works now.

like image 184
Popo Avatar answered Dec 28 '22 11:12

Popo