Page 1 of 1

Error on Windows Seven - download a file from a website

Posted: Mon Oct 04, 2021 8:46 am
by Silvio.Falconi
Error description: (DOS Error -2147352567) WINOLE/1007 Impossibile individuare la risorsa specificata.
(0x800C0005): msxml6.dll

I use with
oHtp = CREATEOBJECT( "Msxml2.XMLHTTP.6.0" )


same function on Windows 10 run perfectly

Code: Select all | Expand

Static Function DescargFichDesdeUrl(cPath)
   local cZipFile := cPath+"storico_"+DtoS(Date())+".zip"
   local cUrl  := URL_

   IF GETURLTOFILE(cUrl,cZipFile)
      Msginfo("File scaricato")
   else
       Msginfo("File non  scaricato","Attenzione")
    endif

RETURN NIL

STATIC FUNCTION GETURLTOFILE( cUrl, cFile, cUsr, cPsw )
    LOCAL lOk := .F.

    LOCAL oHtp, oStr, ex

    DEFAULT cFile := CFILENAME( STRTRAN( cUrl, "/", "\" ) )

    //TRY
        oHtp = CREATEOBJECT( "
Msxml2.XMLHTTP.6.0" )

        oHtp:Open( "
POST", cUrl, .F., cUsr, cPsw )

        oHtp:Send()


        IF oHtp:Status != 200 THEN BREAK
        MemoWrit(cFile,oHtp:ResponseBody)
        //oStr = CREATEOBJECT( "
ADODB.Stream" )
        //oStr:Open()
        //oStr:Type = 1
        //oStr:Write( oHtp:ResponseBody )
        //oStr:SaveToFile( cFile, 2 )
        //oStr:Close()

        lOk = .T.
    //CATCH ex
    //        ? ex:message
    //END

    RETURN lOk





any solution ?

Re: Error on Windows Seven - download a file from a website

Posted: Mon Oct 04, 2021 5:00 pm
by Antonio Linares
This may help:

https://stackoverflow.com/questions/48530690/https-request-blocked-in-windows7

objXMLHTTP.setRequestHeader "Origin", ls_address

Re: Error on Windows Seven - download a file from a website

Posted: Wed Oct 06, 2021 8:14 am
by Silvio.Falconi
Antonio Linares wrote:This may help:

https://stackoverflow.com/questions/48530690/https-request-blocked-in-windows7

objXMLHTTP.setRequestHeader "Origin", ls_address


I tried with that
but
Error description: (DOS Error -2147352567) WINOLE/1007 Errore nel supporto per il canale di protezione
(0x80072F7D): msxml3.dll