如何将 Http Post 请求发送到 Classic ASP 中的外部安全 https 页面?
How to send Http Post request to an external secure https page in Classic ASP?
我无法向以 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
%>
我通过切换解决了我的问题:
Set httpRequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
至此
Set httpRequest = Server.CreateObject("MSXML2.XMLHTTP.6.0")
我无法向以 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
%>
我通过切换解决了我的问题:
Set httpRequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
至此
Set httpRequest = Server.CreateObject("MSXML2.XMLHTTP.6.0")