1.
Exception:
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel" on Service call
Solution:
- Add the folowing entry in web.config
<servicePointManager checkCertificateName="false" checkCertificateRevocationList="false"/>
- Write the following code just before the service call
ServicePointManager.ServerCertificateValidationCallback = (obj,certificate,chain,errors) => true;
Exception:
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel" on Service call
Solution:
- Add the folowing entry in web.config
<servicePointManager checkCertificateName="false" checkCertificateRevocationList="false"/>
- Write the following code just before the service call
ServicePointManager.ServerCertificateValidationCallback = (obj,certificate,chain,errors) => true;