MSXML2. ServerXMLHTTP & HTTPS & Certificate Expiration-msxml3.dll ' 80072f05 '

Source: Internet
Author: User
Tags ssl certificate

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 '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.