CreateObject("MSXML2.ServerXMLHTTP") not working (1 Viewer)

smig

Registered User.
Local time
Today, 11:37
Joined
Nov 25, 2009
Messages
2,209
I'm using CreateObject("MSXML2.ServerXMLHTTP") for long time to automatically download files from my server

recently I can't download getting an error with secured channel
I get the error on .Send

it does not netter if I send the file to get as HTTP or HTTPS

the files are public so no need for UserName or Password

Code:
Public Function fnDownloadHTTP(strTarget As String, strSaveAs As String, Optional strUserName As String, Optional strPassword As String) As Boolean

' On Error GoTo errHere


Dim xmlHTTP As Object
Dim strRespText As String

fnDownloadHTTP = True

'Set xmlHTTP = CreateObject("Microsoft.XMLHTTP")
Set xmlHTTP = CreateObject("MSXML2.ServerXMLHTTP")

With xmlHTTP
    .Open "GET", strTarget, False, strUserName, strPassword
    .setRequestHeader "cache-control", "no-cache,must revalidate"
    .send
End With
 
If fnSaveDownloadFile(strSaveAs, xmlHTTP.responseBody) = False Then
    fnDownloadHTTP = False
End If
 
 
ExitHere:
    Set xmlHTTP = Nothing
    Exit Function
 
errHere:
    fnDownloadHTTP = False
    Resume ExitHere

End Function
 
not sure I can suggest anything - but what is the error description?
 
not sure I can suggest anything - but what is the error description?
RunTime error -2147012739 Error support the secured channel (Translated from Hebrew)
 
take a look at this link - it suggests a slight different object
 
Do you need the actual file, or just the contents?
Though at the end process I will need to download files, reading the content will be great :)
It's a simple one short line content with a version number
 
With the following simple function:
Code:
Function HTTP_Get(webServiceURL As String) As String

  Const XMLHTTP             As String = "MSXML2.ServerXMLHTTP", _
        METHOD_GET          As String = "GET", _
        HTTP_STATUS_SUCCESS As Integer = 200
    
  With CreateObject(XMLHTTP)
    .Open METHOD_GET, webServiceURL, False
    .setRequestHeader "cache-control", "no-cache,must revalidate"
    .Send
    If .Status = HTTP_STATUS_SUCCESS Then
      HTTP_Get = .ResponseText
'      Debug.Print .getAllResponseHeaders
'      Debug.Print .responseBody
    Else
      Debug.Print .Status & ": " & .StatusText
    End If
  End With
  
End Function
This is what I get in the Immediate Window (Ctrl+G):
Code:
?HTTP_Get("http://noam.fuchsapps.com/App/Update/NoamLekochotVersion.txt")
11.188

hth,

d
 
When I look up error -2147012739 (which is, in hex 80072F7D) it tells me that there is some error in the encryption algorithm. By any chance did you have an upgrade of any sort - either on YOUR end or on the other end of this connection? It seems to be saying that the server certificate cannot be decoded. The suggestion is that you need to somehow update your Crypto API.

This is an older reference:


Not quite as old but similar concept: Something is out of date


I've looked at several other links and they all more or less give variants of the same issue - that due to something being updated or something going out of date, you cannot establish the session because of a hashing method mismatch. It seems to be somewhat generic in that more than one kind of mismatch can trigger this.
 
With the following simple function:
Code:
Function HTTP_Get(webServiceURL As String) As String

  Const XMLHTTP             As String = "MSXML2.ServerXMLHTTP", _
        METHOD_GET          As String = "GET", _
        HTTP_STATUS_SUCCESS As Integer = 200
   
  With CreateObject(XMLHTTP)
    .Open METHOD_GET, webServiceURL, False
    .setRequestHeader "cache-control", "no-cache,must revalidate"
    .Send
    If .Status = HTTP_STATUS_SUCCESS Then
      HTTP_Get = .ResponseText
'      Debug.Print .getAllResponseHeaders
'      Debug.Print .responseBody
    Else
      Debug.Print .Status & ": " & .StatusText
    End If
  End With
 
End Function
This is what I get in the Immediate Window (Ctrl+G):
Code:
?HTTP_Get("http://noam.fuchsapps.com/App/Update/NoamLekochotVersion.txt")
11.188

hth,
When I look up error -2147012739 (which is, in hex 80072F7D) it tells me that there is some error in the encryption algorithm. By any chance did you have an upgrade of any sort - either on YOUR end or on the other end of this connection? It seems to be saying that the server certificate cannot be decoded. The suggestion is that you need to somehow update your Crypto API.

This is an older reference:


Not quite as old but similar concept: Something is out of date


I've looked at several other links and they all more or less give variants of the same issue - that due to something being updated or something going out of date, you cannot establish the session because of a hashing method mismatch. It seems to be somewhat generic in that more than one kind of mismatch can trigger this.
Thanks

I'll try to ask the server holder for assist
d
I get the same error, on .Send :(
 
When I look up error -2147012739 (which is, in hex 80072F7D) it tells me that there is some error in the encryption algorithm. By any chance did you have an upgrade of any sort - either on YOUR end or on the other end of this connection? It seems to be saying that the server certificate cannot be decoded. The suggestion is that you need to somehow update your Crypto API.

This is an older reference:


Not quite as old but similar concept: Something is out of date


I've looked at several other links and they all more or less give variants of the same issue - that due to something being updated or something going out of date, you cannot establish the session because of a hashing method mismatch. It seems to be somewhat generic in that more than one kind of mismatch can trigger this.
How do I update my Crypto API ?
 

Users who are viewing this thread

Back
Top Bottom