The problem
It is frequent that you will need to either consume web references or expose web services that are called in secure HTTP (HTTPS). In that situation, you may run into problems if the certificate you are using in your web server, or the certificate in the server exposing the service you are consuming, are not issued by a trustworthy authority.
In such cases, you may be presented with an error similar to the one below:
This scenario becomes more frequent in the non-productive environments - it is frequent that companies purchase certificates for the production servers, but install self-issued certificates for the other staging environments.
Resolution
To overcome this error, you need to install the certificate that is used by the web service provider in the server that will be calling the web service.
Obtaining the certificate
To obtain the certificate, you can either:
Installing the certificate
In Windows 2003, certificate installation can be done by using the follwing procedure:
After that, simply restart IIS and try calling the web service again.
I had this same error in Prod that was resolved by republishing the application holding the webservice! Issue appeared out of nowhere and was not reproducible in Test or Dev. SSL certificates did not change.
i am using outsystems cloud. my id is darshanranganatha.outsystemscloud.com.
Now, when i am trying to add the rest services which is hosted on azure (it is a secure website having a self-signed certificate), it is not able to execute the rest api.
Its giving an error The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
what to do here??/