标签:
昨天测试一个几天前写的一个应用,时不时的报错:
msxml3.dll ‘80072f05‘
The date in the certificate is invalid or has expired
经过上午3个小时的努力,终于找到原因和解决办法。
原因: 证书过期
解决办法:
Dim xmlhttp Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.setOption(2) = 13056 ‘解决因证书错误(证书过期): xmlhttp.send (data) ‘有可能抛出: The date in the certificate is invalid or has expired
这个办法来自: http://geekswithblogs.net/narent/archive/2008/09/24/125418.aspx
Following code will display error: The date in the certificate is 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 highlightrd lines in the code, in that case communication will 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 & 证书过期 — msxml3.dll '80072f05'
标签:
原文地址:http://www.cnblogs.com/personnel/p/4584881.html