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