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

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

问题描述

我支持那些通过HTTPS连接到支付网关一个经典的ASP应用程序。直到最近没有出现过问题。前几天最新的更新安装在服务器(Windows Server 2003)上,并导致网站中断。一个code片断如下。

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.

我很茫然。我所做的研究具有引领我一事无成。我甚至尝试#1以下发现: -

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要求即使服务器并不需要它,并指出如何安装一个KB文章,但已经过时,不能正常工作。

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天全站免登陆