I must consume a PHP webservice which has a SSL certificate. My .net 3.5 Class library references the webservice with 'Add Service references' in Visualstudio 2010 (WCF right?).
When calling the main method of the webservice I receive;
Could not establish secure channel for SSL/TLS with authority '{base_url_of_WS}'.
I tried a lot, like
System.Net.ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
public bool CheckValidationResult(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
return true;
}
But It wouldn't work. Also I have the certificate installed on my own machine.
*Extra info; When I use the wsdl location in 'Add service reference' the same error occurs. Before I tried it, I worked with a static wsdl.
See Question&Answers more detail:os