Results 1 to 2 of 2

Thread: Need help with FTP Passive Mode Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2001
    Location
    Indiana USA
    Posts
    2

    Need help with FTP Passive Mode Problem

    Some time ago we wrote a simple FTP component (and I mean simple) in VB using the Inet object. We set the URL, username, and password properties, etc. I'm sure you know the drill. This component has worked like a champ until we ran into a weird problem that we are stumped about.

    We use this component to transfer small text files from Windows machines to a Linux server. We have a Win2000 machine that is trying to transfer files but is failing. According to the logs from the Linux box, it apoears the FTP session is not in "passive" mode.

    I'd be happy to post the code for our component if it would help.

    My questions:

    1. Is there a way to control or set this in the Inet object?
    2. Could it have something to do with a setting or permissions on the Win2000 machine? (There is a Win98 machine 10 feet away that FTP's successfully)
    3. Anyone have any suggestions as to a component out there that would work better for us?

    Thanks very much,
    day10

  2. #2
    Member
    Join Date
    Apr 2001
    Location
    London
    Posts
    58
    Did you ever fix this?

    I have just found your post because I am trying to understand exactly what "passive" means. If you know please let me know.

    I assume that you are using the API function InternetConnect ???

    If so you'll know that it looks like this:

    Code:
    Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" _
        (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, _
        ByVal sUserName As String, ByVal sPassword As String, ByVal lService As Long, _
        ByVal lFlags As Long, ByVal lContext As Long) As Long

    lFlags determines whether it is passive or not.

    0 = non-passive
    &H000000 = passive

    If you are not using this then I can send you a component that does.

    RKW.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width