服务器返回错误 - 完成此操作所需的数据尚不可用于 VB 脚本
Server returned error - The data necessary to complete this operation is not yet available for VB script
为什么下面的代码无法成功连接到需要 SHA2 证书的服务器?我们的一位合作伙伴进行了 SHA2 升级,他们要求我们拥有 SHA2 证书。当我们连接到他们不需要 SHA2 证书(仅 SHA1)的站点时,它会使用以下代码成功连接。当我们尝试连接到需要 SHA2 证书 (secure.anywhere.org) 的站点时,我们收到错误消息:Server returned error - The data necessary to complete this operation is not yet available。安装了所有正确的 SHA2 证书。我们为 SHA2 安装了根证书和中间证书。这可能是 WinHTTP 的问题吗?或者这可能是我们需要修复的环境配置问题?
完全错误:
服务器返回错误:-2147483638
完成此操作所需的数据尚不可用。
用于连接的代码:
<%
On Error Resume Next
Response.ContentType = "text/html"
Dim xobj
Dim sPostData
Set xobj = CreateObject("WinHttp.WinHttpRequest.5.1")
If Err.Number <> 0 Then
Response.Write "<b>"
Response.Write "Error Creating XMLHTTP: " & Err.Number & "<BR>" & Err.Description
Response.Write "</b>"
Response.End
End If
If Not IsObject(xobj) Then
Response.Write "<b>"
Response.Write "xobj is not an object: " & Err.Number & "<BR>" & Err.Description
Response.Write "</b>"
Response.End
End If
qu = Request.form("SSN")
sPostData
sPostData = "user_id=abcd1234&password=67judlaufosaf&qu=" & qu
xobj.Open "POST", "https://www.anywhere.org/secure_area/test_panel.asp", False
xobj.setRequestHeader "Referer", "https://www2.homeu.nc.edu/tns/connect.asp"
xobj.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xobj.Send sPostData
response.buffer = True
response.clear
response.ContentType = xobj.getResponseHeader("Content-Type")
response.AddHeader "Content-Type", xobj.getResponseHeader("Content-Type")
response.BinaryWrite xobj.responseBody
If Err.Number <> 0 Then
Response.Write "<b>"
Response.Write "Server returned error: " & Err.Number & "<BR>" & Err.Description
Response.Write "</b>"
Set xobj = nothing
Response.End
End If
Set xobj = nothing
response.end
%>
此问题是由于Windows没有足够的信息来验证 SHA-2 证书。当我们检查证书的状态时,它的状态为 "The issuer of this certificate could not be found"。这是解决方案的link。
为什么下面的代码无法成功连接到需要 SHA2 证书的服务器?我们的一位合作伙伴进行了 SHA2 升级,他们要求我们拥有 SHA2 证书。当我们连接到他们不需要 SHA2 证书(仅 SHA1)的站点时,它会使用以下代码成功连接。当我们尝试连接到需要 SHA2 证书 (secure.anywhere.org) 的站点时,我们收到错误消息:Server returned error - The data necessary to complete this operation is not yet available。安装了所有正确的 SHA2 证书。我们为 SHA2 安装了根证书和中间证书。这可能是 WinHTTP 的问题吗?或者这可能是我们需要修复的环境配置问题?
完全错误:
服务器返回错误:-2147483638 完成此操作所需的数据尚不可用。
用于连接的代码:
<%
On Error Resume Next
Response.ContentType = "text/html"
Dim xobj
Dim sPostData
Set xobj = CreateObject("WinHttp.WinHttpRequest.5.1")
If Err.Number <> 0 Then
Response.Write "<b>"
Response.Write "Error Creating XMLHTTP: " & Err.Number & "<BR>" & Err.Description
Response.Write "</b>"
Response.End
End If
If Not IsObject(xobj) Then
Response.Write "<b>"
Response.Write "xobj is not an object: " & Err.Number & "<BR>" & Err.Description
Response.Write "</b>"
Response.End
End If
qu = Request.form("SSN")
sPostData
sPostData = "user_id=abcd1234&password=67judlaufosaf&qu=" & qu
xobj.Open "POST", "https://www.anywhere.org/secure_area/test_panel.asp", False
xobj.setRequestHeader "Referer", "https://www2.homeu.nc.edu/tns/connect.asp"
xobj.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xobj.Send sPostData
response.buffer = True
response.clear
response.ContentType = xobj.getResponseHeader("Content-Type")
response.AddHeader "Content-Type", xobj.getResponseHeader("Content-Type")
response.BinaryWrite xobj.responseBody
If Err.Number <> 0 Then
Response.Write "<b>"
Response.Write "Server returned error: " & Err.Number & "<BR>" & Err.Description
Response.Write "</b>"
Set xobj = nothing
Response.End
End If
Set xobj = nothing
response.end
%>
此问题是由于Windows没有足够的信息来验证 SHA-2 证书。当我们检查证书的状态时,它的状态为 "The issuer of this certificate could not be found"。这是解决方案的link。