Have called many restful services from asp before - but this one has me stumped. First my func looks like
Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
with objHTTP
.open "post", x_posturl, False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.send x_xmlstr
end with
and the error returned is
msxml3.dll error '80072f0d' The certificate authority is invalid or incorrect
so, googled a bit and suggestion was to add line
.setOption 2, 13056
this gives error
msxml3.dll error '80072f0c' A certificate is required to complete client authentication
I then contacted service supplier and they suggested
Click on the certificate error next to the address bar, view the certificate, select Details, select Copy to File, and download it to a file. Install that into your trusted certificates on your server to stop the error appearing when trying to submit data.
So, tried that using instructions here - but still no joy, any help appreciated
It seems like the server located at x_posturl
has a certificate that is misconfigured, or that your client computer doesn't contain/recognize the certificate's root authority (most likely). There are a few options to fix:
MSXML2.ServerXMLHTTP
to ignore certificate errors, which appears to be answered here: VBA ServerXMLHTTP https request with self signed certificate
x_posturl
to start with http://
instead of https://
— if it's supported by the provider. Would not recommend this in a production scenario though.Can you share specifically what x_posturl
is? We should be able to debug by looking at the SSL handshake.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With