title: Server returned error - The data necessary to complete this operation is not yet available for VB script
body: <p>Why can't the code below connect successfully to servers that require SHA2 certs?  One of our partners had a SHA2 upgrade and they require us to have SHA2 certs.  When we connect to their site that doesn't require SHA2 certs(only SHA1) it connects successfully with the code below.  When we try to connect to a site that requires SHA2 certs(secure.anywhere.org) we get the error: <strong>Server returned error - The data necessary to complete this operation is not yet available</strong>  .  All of the correct SHA2 certs are installed. We have the Root and Intermediate certs installed for SHA2.  Could this be an issue with WinHTTP? Or is this possibly something with our environment configuration that we need to fix?</p>
  
  <p><strong>Full error:</strong></p>
  
  <p>Server returned error: -2147483638
  The data necessary to complete this operation is not yet available.</p>
  
  <p><strong>Code used to connect:</strong></p>
  
  <pre><code>&lt;%
  
  On Error Resume Next
  Response.ContentType = "text/html"
  Dim xobj
  Dim sPostData
  
  
  
  Set xobj = CreateObject("WinHttp.WinHttpRequest.5.1")
  
  If Err.Number &lt;&gt; 0 Then
  Response.Write "&lt;b&gt;"
  Response.Write "Error Creating XMLHTTP: " &amp; Err.Number &amp; "&lt;BR&gt;" &amp;     Err.Description
  Response.Write "&lt;/b&gt;"
  Response.End
  End If 
  
  If Not IsObject(xobj) Then
  Response.Write "&lt;b&gt;"
  Response.Write "xobj is not an object: " &amp; Err.Number &amp; "&lt;BR&gt;" &amp; Err.Description
  Response.Write "&lt;/b&gt;"
  Response.End
  End If
  
  qu = Request.form("SSN")
  
  
  sPostData
  sPostData = "user_id=abcd1234&amp;password=67judlaufosaf&amp;qu=" &amp; 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 &lt;&gt; 0 Then
  Response.Write "&lt;b&gt;"
      Response.Write "Server returned error: " &amp; Err.Number &amp; "&lt;BR&gt;" &amp;  Err.Description
  Response.Write "&lt;/b&gt;"
  Set xobj = nothing
  Response.End
  End If 
  
  Set xobj = nothing
  response.end
  %&gt;
  </code></pre>