Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FTP workson development machine but not another
Message
De
23/12/2016 17:30:15
Rob Clapworthy
Bespoke Software Systems
Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
FTP workson development machine but not another
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01645986
Message ID:
01645986
Vues:
42
Hi

Using Wininet to upload a file onto a hosted server,

My program works on my development machine from source code or if I build as an EXE from same folder as source is stored in
but not from other Windows 10 machines running as an EXE


DECLARE INTEGER InternetOpen in WinINet.dll ;
STRING cAgent, INTEGER nType, STRING cProxy, STRING cBypass, INTEGER nFlags
DECLARE INTEGER InternetCloseHandle in WinINet.dll ;
INTEGER nInternetHandle
DECLARE INTEGER InternetConnect in WinINet.dll ;
INTEGER nInternetSession, STRING cServer, INTEGER nPort, ;
STRING cUserName, STRING cPassword, INTEGER nService, INTEGER nFlags, INTEGER nContext
DECLARE INTEGER FtpSetCurrentDirectory IN WinINet.dll ;
INTEGER nFtpSession, STRING cDirectory
DECLARE INTEGER FtpOpenFile IN WinINet.dll ;
INTEGER nFtpSession, STRING lpszFileName, INTEGER nAccess, INTEGER NFlags, ;
INTEGER nContext
DECLARE INTEGER InternetWriteFile IN WinINet.dll ;
INTEGER nFile, STRING cBuffer, ;
INTEGER nToWrite, INTEGER @ nWritten
DECLARE INTEGER FtpRenameFile IN WinINet.dll ;
INTEGER nFile, STRING lpszExisting, STRING lpszNew
DECLARE INTEGER FtpDeleteFile IN WinINet.dll ;
INTEGER nFile, STRING lpszFileName
this.Cusername=alltrim(settings.oUsername)+"@Mydomainname.com"
this.CPassword=alltrim(settings.oPassword)
this.cserver="Myserver999.Myweb-hosting.com"
This.nSession = InternetOpen("Wininet",0,.NULL.,.NULL.,0)

this.cremotedir=''

IF This.nSession=0
RETURN .F.
ENDIF

mcurrent=CURDIR()
This.nFTPSession = InternetConnect(This.nSession,ALLTRIM(This.cServer),21,;
ALLTRIM(This.cUserName),ALLTRIM(This.cPassword),1,0x08000000,0)

* From any other machine than from my VFP development machine This.nFTPSession is always 0 at this point

Is there any way of me querying the reason why on the other machines the logon fails?

If I set up Filezilla on the other machines it logs in to the server with no issues

Any help extremley appreciated
Répondre
Fil
Voir

Click here to load this message in the networking platform