title: An error occurred in the secure channel support - Classic ASP HTTP Request
body: <p>I have a classic ASP website running on a Windows Server 2012 box.  One page makes a HTTP request to another application over https using code like this:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Sub ShopXML4http(url, inStr, outStr, method, xmlerror)
    Dim objhttp
    Set objhttp = Server.CreateObject ("MSXML2.ServerXMLHTTP.6.0")
    objHttp.open method, url, false
    If Method="POST" Then
      objHttp.Send instr
    Else
      objHttp.Send
    End if   
    outstr=objHttp.responseText
    Set objhttp=nothing
  End Sub
  </code></pre>
  
  <p>This code works fine almost all of the time (thousands of requests per day), but sporadically it will fail with a message like this:</p>
  
  <blockquote>
    <p>Number:  -2147012739</p>
    
    <p>Description:  An error occurred in the secure channel support</p>
    
    <p>Source:  msxml6.dll</p>
  </blockquote>
  
  <p>The application was recently moved from an old Windows 2003 Server to the 2012 Server, and this issue never seemed to be a problem on the old server. In addition, while this error is happening on the website, I could run the exact same code in a VBScript and it works fine.  Resetting the application pool seems to cause the site to be able to do the secure HTTP requests again (although it often fixes itself before I can get to the server).</p>