PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Problem with FTP commands and IE11
Problem with FTP commands and IE11
Iniciado por guest, 24,jul. 2015 18:20 - 7 respuestas
Publicado el 24,julio 2015 - 18:20
I'm experiencing crashes with some FTP commands from WD20.
Given
connID is int = FTPConnect("192.168.1.16", "admin", "pw", 21, True, 2)
IF (connID = -1) THEN
Error("Connection failed")
RETURN
END
that works perfectly

FTPSend(connID, "C:\MYDIR\FILE.DAT", "/") runs fine
FTPDeleteFile(connID, "FILE.LOG") runs fine too
FTPGet(connID, "FILE.LOG", "C:\MYDIR") makes the app hang / crash

In order to find a workaround about FTPGet I tried
FTPCommand(connID, "RETR FILE.LOG", sAnswer, sResult)
that runs fine until I have IE8, when I upgrade to IE11 it starts hanging the app + crash

I just read there are problems with later IE versions and FTP commands... how do you guys work around this issue?

Thank you
Publicado el 24,julio 2015 - 18:25
did you try using FTPParameter(ftpParameterMode, 1) before the FTPConnect

http://doc.windev.com/en-US/…
http://faq.windev.com/8387-ftp_windows_81_ftpcommand_ftpconnect-read.awp…
Publicado el 24,julio 2015 - 19:21
I tried now, thank you for the advice.
Default parameter was 0 and crashed, with 1 it doesn't crash but says "connection failed"
Should I change other parameters in FTPConnect? It fails, I cannot reach the RETR
Publicado el 27,julio 2015 - 10:16
with FTPParameter(ftpParameterMode, 1) you can't use FTPCommand only FTPSend, FTPGet and so on.
Publicado el 27,julio 2015 - 11:08
Sure, but I tried with parametermode = 1 but the answer to FTPConnect is

Failure connectiong to FTP server ("192.168.1.16") on port 21 with user name admin.
System Error Details: Unexpected server response.

There is no problem in the connection because with parametermode = 0 I can perform the PUT via "windows mode", the one that fails on RETR.
Publicado el 27,julio 2015 - 13:37
I don't have v20 but in v18 using ftpParamètre(1,1) and one AS400 as the ftp server i don't have problems in the connection.

In the case of the AS400 as the ftp server using ftpParamètre(1,1) changes the format of the file names but this is because the AS400 can show the file names in more than one format.

What are you using as your ftp server?
Publicado el 27,julio 2015 - 14:14
It's a ethernet cash register.
You put the ticket info via ftp
Publicado el 29,julio 2015 - 20:25
I tried on common ftp servers and it runs fine with FTPParameter(ftpParameterMode, 1)

Only on these ethernet cash registers I got this error in FTPConnect.
If I use FTPParameter(ftpParameterMode, 0) I can connect the cash register with FTPConnect but I get errors on FTPGet, due to IE11 upgrade

It says error 100002 - "unexpected server response".
If I use a wrong user or pw the error is about authentication so I figure it takes the user/pw.