HRESULT -2146697191 (0x800C0019) "The Secure Sockets Layer (SSL) certificate is invalid." with CreateObject("MSXML2.XMLHTTP.6.0") RRS feed

  • Question

  • the vbs script is working fine on windows 2003.

    New OS windows 2008 server

    https site and using

    set xmlhttp = CreateObject("MSXML2.XMLHTTP.6.0")

    xmlhttp.Open "GET", site , false, user, userPassword

    Error occurs at line:

        xmlhttp.send "username=user&password=userPassword"

    Please advise how to resolve for windows 2008.


    Friday, December 2, 2011 2:57 AM

All replies

  • It may because the server certificate is not trusted by you. You may need to add server certificate to your trust list.

    Friday, December 2, 2011 3:13 AM
  • Was told the certificates were installed. Is there a way suppress certificate checking with MSXML2.XMLHTTP.6.0?
    Friday, December 2, 2011 8:30 PM
  • No. You cannot suppress certificate checking for security reason. Can yo check what will happen if you access the URL use IE?
    Monday, December 5, 2011 3:29 AM
  • User used IE and login to the site fine without certificate error. Could it be something in the script then? What is handled differently for MSXML2.XMLHTTP in 2003 vs 2008? Thanks
    Monday, December 5, 2011 9:44 PM
  •     dim site
        set xmlhttp = CreateObject("MSXML2.XMLHTTP.6.0")

        xmlhttp.Open "GET", URL, false, user, userPassword

        xmlhttp.setRequestHeader "USER-AGENT", "USER-AGENT-NAME"

    ''Get error -2146697191 for following:
        xmlhttp.send "username=user&password=userPassword" 

    Please advise. Thanks.
    Monday, December 5, 2011 9:59 PM
  • Error: -2146697191 means "Security certificate required to access this resource is invalid. "

    There are two certificates you need to check

    1. Check sever certificate is trusted by your machine

    2. Check if you have client certificate that required by your server.




    Tuesday, December 6, 2011 3:44 AM

    1. Check sever certificate is trusted by your machine 

    Yes because IE from windows 2008 is able to go the https site with no certificate error. How to confirm that a from windows2008 server? Is it possible to get a list of certificates with serial numbers from command line?

    2. Check if you have client certificate that required by your server.

    Is there a switch in IIS for windows 2008 which require checking of Security certificate? Please advise. Thanks.


    Tuesday, December 6, 2011 3:48 PM
  • Sorry I cannot offer more help on this since the error -2146697191 is comming from URLMON (LINK: http://social.msdn.microsoft.com/Forums/en-US/xmlandnetfx/thread/b38d17fb-dad4-4e99-9802-e31e6f2f3dcc), and I am not an expert on that area.

    My suggestion is to carefully exam the certificate chain.

    PS. Here are links i found, hope it helps:

    * http://help.aol.com/help/microsites/microsite.do?cmd=displayKC&docType=kc&externalId=223215


    Wednesday, December 7, 2011 5:37 AM