Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with certificate 2

Status
Not open for further replies.

rha2000

Programmer
Aug 6, 2012
14
AR
Hello

I do not need the certificate request:

web = "XML = CREATEOBJECT("WinHttp.WinHttpRequest.5.1")
TRY
XML.Open("GET", web , .F.)
XML.SetCredentials("user", "pass", 0)
XML.SetRequestHeader("content-type", "application/x- XML.Send

CATCH TO oError WHEN .T.
** ERROR

FINALLY
WAIT CLEAR
ENDTRY

It throws the following error in oError.details:
"OLE IDispatch exception code 0 from WinHttp.WinHttpRequest: The certificate authority is invalid or incorrect


With the following code I can access fine, but show me an alert window notifying me that the security certificate is valid and asking me if I want to continue. I need that window does not appear.

web = "XML = CreateObject("Microsoft.XMLHTTP")
XML.Open("GET", web, .f.,"user","pass")
try
XML.Send
CATCH TO oError WHEN .T.
** ERROR
FINALLY
WAIT CLEAR
ENDTRY

How do I disable the security certificate?

Thanks
 
I would look into internet settings.

Another thing I notice is using version 5.1, while you would either use 6.0 or 3.0 depending on OS from what I found for answering thread184-1715949 MSXML5 is for office and so rather for Office internal use. Referring to Wikipedia: "Microsoft has not released documentation for this version because Microsoft considers MSXML 5 an internal/integrated component of Office 2003. MSXML 5 is not included in Office 2010.[8]"
So it's obsolete, deprecated, it may not work correctly with certificates anyway.

Bye, Olaf.

 

Try setting xml.setOption(2) = 13056 to ignore ssl errors.

Marco

 
I solved the problem as follows:

XML = CreateObject ("MSXML2.ServerXMLHTTP.6.0")

web = "https:// ..."

Xml.Open ("GET", web,.F., "User", "pass")
XML.SetRequestHeader ("content-type", "application/x-XML.setOption (2, 13056)
XML.send


thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top