Yesterday test a few days ago wrote an application, from time to time the error:
Msxml3.dll ' 80072f05 '
The date in the certificate are invalid or has expired
After 3 hours of morning efforts, finally found the cause and solution.
Cause: Certificate Expiration
Workaround:
Dim Xmlhttpset xmlhttp = Server.CreateObject ("MSXML2. ServerXMLHTTP ") xmlhttp.setoption (2) = 13056 ' resolves a certificate error (certificate expired): Xmlhttp.send (data) ' could be thrown: the date in the certificate is invalid or has expired
This approach comes from: http://geekswithblogs.net/narent/archive/2008/09/24/125418.aspx
Following code would display error:the date in the certificate was invalid or has expired. If the SSL cerificate on the server is expired.
Set objhttp = Server.CreateObject ("MSXML2. serverxmlhttp.3.0 ")
Objhttp.open "POST", "https://<posturl>", False
Objhttp.send objrequest
We need to update the SSL certificate to get it work, we can also ignore the above error just by adding following Highligh TRD lines in the code, in this case communication would no longer be secure.
Const sxh_server_cert_ignore_all_server_errors = 13056
Set objhttp = Server.CreateObject ("MSXML2. serverxmlhttp.3.0 ")
Objhttp.setoption (2) = Sxh_server_cert_ignore_all_server_errors
Objhttp.open "POST", "https://<posturl>", False
Objhttp.send objrequest
2013-04-17
MSXML2. ServerXMLHTTP & HTTPS & Certificate expires-msxml3.dll ' 80072f05 '