Wednesday, August 24, 2016

Could not establish trust relationship for the ssl/tls secure channel with authority c# ASP.Net - Web service

In C#

System.Net.ServicePointManager.ServerCertificateValidationCallback = (senderX, certificate, chain, sslPolicyErrors) => { return true; };

In VB.Net

System.Net.ServicePointManager.ServerCertificateValidationCallback = 
Function(senderX, certificate, chain, sslPolicyErrors)
Return True
End Function


Add this line just before calling the Web service method, issue will be solved  

No comments:

Post a Comment