Error on Windows Seven - download a file from a website

Error on Windows Seven - download a file from a website

Postby Silvio.Falconi » Mon Oct 04, 2021 8:46 am

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 view  RUN
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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7063
Joined: Thu Oct 18, 2012 7:17 pm

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

Postby Antonio Linares » Mon Oct 04, 2021 5:00 pm

This may help:

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

objXMLHTTP.setRequestHeader "Origin", ls_address
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42102
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby Silvio.Falconi » Wed Oct 06, 2021 8:14 am

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7063
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 115 guests