1

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

<%
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
%>
4

1 回答 1

0

I solved my problem by switching from this:

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

to this

Set httpRequest = Server.CreateObject("MSXML2.XMLHTTP.6.0")
于 2016-05-19T21:25:04.307 回答