经典asp中的WinHttp TLS连接 [英] WinHttp TLS connection in classic asp

查看:14
本文介绍了经典asp中的WinHttp TLS连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将支付数据发送到 SagePay,由于他们关闭了 SSL,因此需要使用 TLS 发送.

I'm trying to send payment data to SagePay and, as they are turning off SSL, it needs to be sent using TLS.

我的代码如下:

set httpRequest = Server.CreateObject("WinHttp.WinHttprequest.5.1")
httpRequest.Open "POST", CStr(strPurchaseURL), false
httpRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
httpRequest.send strPost
strResponse = httpRequest.responseText

有人告诉我,添加一个选项可以让您设置使用的协议,但我发现的唯一一个是:

I've been told that adding an option lets you set the protocol used but the only one I've found is:

httpRequest.option(9) = 2720

它允许 TLS 和 SSL,但它只能是 TLS,有没有人知道代码需要是什么,或者我应该做些什么.

which allows for TLS and SSL but it can only be TLS, does anyone know what the code needs to be or is there something else I should be doing.

推荐答案

如果您使用的是 Windows Server 2003,您可能会遇到与我相同的问题 - 如果您可以访问服务器,请尝试我添加到我的答案在这里自己的问题:https://stackoverflow.com/a/29140418/1081692 看看你是怎么做的.

If you are on Windows Server 2003 you may be having the same problem I was having - if you have access to the server, try the answer I added to my own question here: https://stackoverflow.com/a/29140418/1081692 and see how you get on.

这篇关于经典asp中的WinHttp TLS连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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