I'm using VBA to download files from my domain (A Sub Domain)
I'm getting an error that there is a problem with the secured channel.
This will happen if I try to Download the file using HTTPS address but will not if I use unsecured HTTP addres
The domain do have SSL, and I have no problem seeing the file using the same HTTPS address on the browser.
HTTPS Text File
I'm getting an error that there is a problem with the secured channel.
This will happen if I try to Download the file using HTTPS address but will not if I use unsecured HTTP addres
The domain do have SSL, and I have no problem seeing the file using the same HTTPS address on the browser.
HTTPS Text File
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
Last edited: