不能将 HTTPS 与 ServerXMLHTTP 对象一起使用 [英] Can't use HTTPS with ServerXMLHTTP object

查看:45
本文介绍了不能将 HTTPS 与 ServerXMLHTTP 对象一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我支持通过 HTTPS 连接到支付网关的经典 ASP 应用程序.直到最近都没有问题.几天前,服务器 (Windows Server 2003) 上安装了最新更新并导致站点中断.代码片段如下.

I am supporting a Classic ASP application that connects to a payment gateway via HTTPS. Up until recently there have been no issues. A few days ago the latest updates were installed on the server (Windows Server 2003) and caused the site to break. A code snippet is below.

Dim oHttp
Dim strResult
Set oHttp = CreateObject("MSXML2.ServerXMLHTTP")
oHttp.setOption(2) = 13056
oHttp.open "POST", SOAP_ENDPOINT, false
oHttp.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8"
oHttp.setRequestHeader "SOAPAction", SOAP_NS + "/" & SOAP_FUNCTION
oHttp.send SOAP_REQUEST

以下是错误对象的转储:-

Below is a dump of the error object :-

编号:-2147012852说明:需要证书才能完成客户端认证消息:需要证书才能完成客户端身份验证

Number: -2147012852 Description: A certificate is required to complete client authentication Message: A certificate is required to complete client authentication

起初我以为是因为支付网关的 SSL 证书没有经过身份验证,或者他们需要客户端证书.我在服务器上的浏览器中测试了 URL,它显示正确且没有错误,并确认支付网关服务器不需要客户端证书.

At first I thought it was because the Payment Gateway's SSL certificate was not being authenticated or they needed a client certificate. I tested the URL in a browser on the server and it displayed correctly without errors and confirmed that the Payment Gateway server did not require a client certificate.

我不知所措.我所做的所有研究都使我无处可去.我什至尝试了在 Stackoverflow 上找到的以下内容:-

I am at a loss. All the research I have done has lead me nowhere. I even tried the following found on Stackoverflow :-

让 XMLHTTP 与 HTTPS 配合使用

xmlHttp、XML 请求、asp

最后一个指出 XMLHTTP 需要一个客户端证书,即使服务器不需要它,并指出了一篇关于如何安装一个的知识库文章,但那是过时的,不起作用.

The last one stated that a client certificate is required by XMLHTTP even though the server does not need it and pointed to a KB article on how to install one, but that is outdated and does not work.

推荐答案

尝试添加 oHttp.setOption 2, 13056

这篇关于不能将 HTTPS 与 ServerXMLHTTP 对象一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆