none
FTP

    Întrebare

  • Hi,

    I have developed an FTP aplication in VFP 6.0 using Winint functions. The aplication is working very well in XP and Win7 32-bit, but I must port it into Server 2008 64-bit R2 plattform.

    The problem is following: The aplication opens the FTP connection correctly, no problem, but it does not manage to make file transfer correctly. The FTP server where I send the files to gets the files, but they are empty, length is zero. Also FTP closing works correctly.

    Why is the file transfer not working in Server 2008 64-bit R2, when it works fine in XP and Win7? 

    3 aprilie 2012 17:05

Răspunsuri

  • ...and there we got the problem, the FtpPutFile function returns FALSE.

    I have tried to see the problem as file access problem and I think it is.  I,ll continue on that phases.

    OK,

    you know you can get a error message via FormatMessage?

    http://support.microsoft.com/kb/241391/en-us

    • Marcat ca răspuns de Juice1953 4 aprilie 2012 16:00
    3 aprilie 2012 19:12
  • Why not? If some spyware/malware, which made it onto the Server would be  ftping files or data, this would also break security, won't it?

    Establishing an FTP connection from FTP client to FTP server actually establishes two one way connections. There are differences in active and passive FTP, but besides a command connection between client and server further data connections are established, which makes FTP a very firewall unfriendly transfer protocol. Or the other way around: A Firewall is quite FTP unfriendly.

    In more detail here: http://www.isaserver.org/articles/how_the_ftp_protocol_challenges_firewall_security.html

    Bye, Olaf.


    • Marcat ca răspuns de Juice1953 4 aprilie 2012 21:10
    4 aprilie 2012 19:27
  • Is it really your program or rather file access problems, perhaps?

    I suppose when you talk of Winint functions you rather mean wininet, eg FtpPutFile. Do you handle errors? Do you call GetLastError, if some Wininet Function returns FALSE? That would perhaps point you to the problem, wouldn't it?

    Bye, Olaf.

    • Marcat ca răspuns de Juice1953 4 aprilie 2012 16:11
    3 aprilie 2012 17:15
  • Why not? If some spyware/malware, which made it onto the Server would be  ftping files or data, this would also break security, won't it?

    Establishing an FTP connection from FTP client to FTP server actually establishes two one way connections. There are differences in active and passive FTP, but besides a command connection between client and server further data connections are established, which makes FTP a very firewall unfriendly transfer protocol. Or the other way around: A Firewall is quite FTP unfriendly.

    In more detail here: http://www.isaserver.org/articles/how_the_ftp_protocol_challenges_firewall_security.html

    Bye, Olaf.


    Hello

    I seek the code to use FTPS  transfer mode. Have you already developed code to use ftps? Thanks


    • Editat de fredcvn 5 aprilie 2012 15:10
    • Marcat ca răspuns de Juice1953 5 aprilie 2012 15:57
    5 aprilie 2012 15:09

Toate mesajele

  • Is it really your program or rather file access problems, perhaps?

    I suppose when you talk of Winint functions you rather mean wininet, eg FtpPutFile. Do you handle errors? Do you call GetLastError, if some Wininet Function returns FALSE? That would perhaps point you to the problem, wouldn't it?

    Bye, Olaf.

    • Marcat ca răspuns de Juice1953 4 aprilie 2012 16:11
    3 aprilie 2012 17:15
  • Hi Olaf,

    you are right, I ment wininet. and I use FtpPutFile and I actually call GetLastError, if some Wininet Function returns FALSE.

    This is quite large a POS-system written in VFP using VFP database. In this LAN my customer has several POS-terminals and Work Stations. The DB is on that Server 2008. Now we are connecting the POS system to a WebStore to have a "realtime"(5 minutes updating interval)  stock in that WebStore.

    I have my aplication now running in one XP Work Station and it works very well, but the aim is to put it running on that server and there we got the problem, the FtpPutFile function returns FALSE.

    I have tried to see the problem as file access problem and I think it is.  I,ll continue on that phases.

    thanks


    Juice1953

    3 aprilie 2012 19:06
  • ...and there we got the problem, the FtpPutFile function returns FALSE.

    I have tried to see the problem as file access problem and I think it is.  I,ll continue on that phases.

    OK,

    you know you can get a error message via FormatMessage?

    http://support.microsoft.com/kb/241391/en-us

    • Marcat ca răspuns de Juice1953 4 aprilie 2012 16:00
    3 aprilie 2012 19:12
  • Hi Olaf,

    the problem wasn't file access, it was Windows Fire Wall. I tought that Windows Fire Wall was only blocking incoming data, but it is also blocking outgoing data. What is the reason?


    Juice1953

    4 aprilie 2012 16:07
  • Why not? If some spyware/malware, which made it onto the Server would be  ftping files or data, this would also break security, won't it?

    Establishing an FTP connection from FTP client to FTP server actually establishes two one way connections. There are differences in active and passive FTP, but besides a command connection between client and server further data connections are established, which makes FTP a very firewall unfriendly transfer protocol. Or the other way around: A Firewall is quite FTP unfriendly.

    In more detail here: http://www.isaserver.org/articles/how_the_ftp_protocol_challenges_firewall_security.html

    Bye, Olaf.


    • Marcat ca răspuns de Juice1953 4 aprilie 2012 21:10
    4 aprilie 2012 19:27
  • Why not? If some spyware/malware, which made it onto the Server would be  ftping files or data, this would also break security, won't it?

    Establishing an FTP connection from FTP client to FTP server actually establishes two one way connections. There are differences in active and passive FTP, but besides a command connection between client and server further data connections are established, which makes FTP a very firewall unfriendly transfer protocol. Or the other way around: A Firewall is quite FTP unfriendly.

    In more detail here: http://www.isaserver.org/articles/how_the_ftp_protocol_challenges_firewall_security.html

    Bye, Olaf.


    Hello

    I seek the code to use FTPS  transfer mode. Have you already developed code to use ftps? Thanks


    • Editat de fredcvn 5 aprilie 2012 15:10
    • Marcat ca răspuns de Juice1953 5 aprilie 2012 15:57
    5 aprilie 2012 15:09
  • I understand, that you ask here, still you should try with a new question.

    That said google yields quite a lot results for VFP FTPS.

    Perhaps the best two:

    http://www.ctl32.com.ar/libcurl.asp

    http://www.sweetpotatosoftware.com/spsblog/2008/12/05/VFPConnectionUpdateHTTPPostFTPCommandsAndMore.aspx

    Bye, Olaf.

    5 aprilie 2012 15:20
  • Hi fredcvn,

    send your email address to jukka.penttila@sunwell.fi , you will get the whole source code from me free.


    Juice1953

    5 aprilie 2012 16:01
  • I have the same problem Juice, my application works to transfer ftp files on xp, but doesn't in Server 2008 64-bit R2.

    Somebody had success in solution of this problem? There's a way to emulate the 32 bit transfer?

    31 mai 2012 21:58
  • Hi,

    did you try below Library to Transfer your File. ?

    VFPConnection 

    hth

    Kalpesh


    Please "Mark as Answer" if this post answered your question. :)

    Kalpesh Chhatrala | Software Developer | Rajkot | India

    Kalpesh 's Blog

    VFP Form to C#, Vb.Net Conversion Utility


    1 iunie 2012 05:36
  • The problem wasn't file access, it was Windows Fire Wall. I tought that Windows Fire Wall was only blocking incoming data, but it is also blocking outgoing data.

    Juice1953

    1 iunie 2012 09:19
  • Juice, at the beginning of the problem, i disabled the windows firewall, but still did not work.

    Kalpesh, i sent the link to the developer of the aplication. I will post the result as soon as he answer me.

    1 iunie 2012 14:27
  • Anyone succeeded in sending files to the ftp? 
    4 iunie 2012 18:15
  • Hi Jonathan_HR,

    I have an working FTP solution  in VFP, would You like to have the source code. If, so I can send it to You


    Juice1953

    4 iunie 2012 18:32
  • Hi Juice1953.

    The application finally worked. The firewall was disabled, but sending files to the ftp does not run. Added to the list of application programs released on the firewall, and there was no error in sending more. The interesting thing is that the firewall was disabled, but still was blocking. The port were released into the firewall, but it was necessary to release the application. Thank you and thanks to all that somehow helped.

    9 iunie 2012 15:44