CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: FTP Prob

  1. #1
    Join Date
    Aug 2005
    Posts
    97

    FTP Prob

    Hi all

    I had written a FTP directory listing program.Problem here is its working fine on my FTP server,but its not working working on client ftpserver i.e.,iam unable to get directory listing there....

    I used following classes:

    class CFileFind;
    class CInternetSession;
    class CFtpFileFind;

    pf = is.GetFtpConnection((LPCTSTR)servername, (LPCTSTR)username, (LPCTSTR) pwd, portno, session_mode);

    is there any limitations like "CFtpFileFind doesn't work on UNIX machines"?

  2. #2
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: FTP Prob

    Check if the other FTP server requires passive mode. Connect with a FTP client and check the server's settings. The CFtpConnection has a bPassive attribute in constructor that you can use.
    Har Har

  3. #3
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: FTP Prob

    [ moved thread ]
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  4. #4
    Join Date
    Aug 2005
    Posts
    97

    Re: FTP Prob

    Quote Originally Posted by PadexArt
    Check if the other FTP server requires passive mode. Connect with a FTP client and check the server's settings. The CFtpConnection has a bPassive attribute in constructor that you can use.

    I tried by making bPassive both TRUE and False in GetFtpConnection arguments,still its not working on other server,but its working on my ftp server what ever i put(bPassive TRUE/FALSE)
    pf = is.GetFtpConnection((LPCTSTR)servername, (LPCTSTR)username, (LPCTSTR) pwd, portno,TRUE);

    Note:I have all owner,group,and public read,write,execute permissions on both the servers.


    Hlp Pls

  5. #5
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: FTP Prob

    If CInternetSession::GetFtpConnection it throws a CInternetSession. Study its content to see what failed and why.
    Har Har

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

Featured