如何将Http Post请求发送到Classic ASP中的外部安全https页面?

时间:2016-05-18 22:37:12

标签: https asp-classic xmlhttprequest serverxmlhttp

我无法以 https 开头向外部网页发送http请求。但是,我使用setOption(2)= 13056来忽略安全性错误,我收到此错误: msxml3.dll错误' 80072f8f' 发生安全错误。我无法访问我的服务器配置并寻找程序化解决方案。

<%
Dim data, httpRequest, postResponse

data= "a="&request.querystring("a")
Set httpRequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
httpRequest.setOption(2) = 13056
httpRequest.Open "POST", "https://example.com", False
httpRequest.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"

httpRequest.Send data

postResponse = httpRequest.ResponseText

'Response.Write postResponse ' or do something else with it
%>

1 个答案:

答案 0 :(得分:0)

我通过切换来解决了我的问题:

Set httpRequest = Server.CreateObject("MSXML2.ServerXMLHTTP")

到这个

Set httpRequest = Server.CreateObject("MSXML2.XMLHTTP.6.0")