CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 1999
    Location
    USA
    Posts
    5

    Re: ftp..need more details



    hi,

    thanks for the response. i shall try to explain my problem in detail.


    when you ftp from the command prompt these are the steps to log on to the ftp server:


    ftp ftp.test.com

    connected to ftp.test.com

    user: test

    password: test

    accountid: test


    now when i use CinternetSession's GetFtpConnection function, the function takes only username and password. what do i do to send the account ID.


    i hope i am clear if not please give me your number and i shall call you.

    thanks a ton.

    regards,

    anup



  2. #2
    Join Date
    Apr 1999
    Posts
    4

    Re: ftp..need more details

    Hi. I had exactly the same question. I thought I would reply and co-miserate with you, and ask perhaps whether you've discovered the solution to the problem?

    I will be looking actively until the solution is found. If you would, please email me at [email protected] if you get a chance. I will be sure to reply to this message if I get the answer!

    Sincerely,
    Anthony Carriveau

  3. #3
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: ftp..need more details

    Hi.

    Please refer to sample code - "Advacned FTP" and its doc
    -"Advacnced FTP, or Teaching Fido To Phetch" from MSDN help.

    HINTERNET hFTPSession;
    hFTPSession = ::InternetConnect(
    hInternetSession, // from InternetOpen

    "ftp://ftp.microsoft.com"
    INTERNET_INVALID_PORT_NUMBER,
    "anonymous", //Username, can be null
    "[email protected]", //Password, can be null
    INTERNET_SERVICE_FTP,
    0,
    (DWORD)0);
    .......................
    InternetCloseHandle(hFTPSession);

    Even though I try MFC class and set my userid to Unix
    mail server, it always go to ftp server directory.
    So, I refer to above code and it goes to my directory.

    HTH.
    -Masaaki Onishi-










  4. #4
    Join Date
    Apr 1999
    Posts
    4

    Re: ftp..need more details

    Hi Maasaki,

    I just reviewed it. Unfortunately, it does not address the issue that anup and I are trying to resolve. If it does, then I totally missed the reference. It does discuss Async connections, and maybe that is the route we need to take, but I didn't see any hint to that effect in the article.

    But, to reiterate anup's dsire for clarity, I think I need to explain the difficulty again.

    When an FTP client attempts a connection with a FTP server, most servers only require the USER username, PASS password information to log the user on. I know that in my case, and probably anup's, the servers we wish to connect to require the ACCT account information as well.

    Unfortunately, the wininet class, getftpconnection has nothing to deal with this issue, and therefore our connections to these servers fail. I know that at least in my case my program CAN connect to Unix and NT FTP servers like a champ. But when I point the client to our mainfram'e server, no dice. Simply to clarify another issue, the sample programs ftptree and ftpjr,also do NOT connect to the mainframe. But using the native microsoft FTP program that supports a command line interface to the FTP service, I am able to enter in the ACCT command and continue. It even works in telnet mode.

    Well, please let me know what you think.

    Best regards,
    Anthony Carriveau

    Sincerely,
    Anthony Carriveau

  5. #5
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: ftp..need more details

    Hi.

    Now I got your guy's problem because I checked the interface
    of WS_FTP.
    To be sure, ACCT edit box exists.
    A couple of hours, I've explored MSDN help and www.sockets.com.
    As a result, I couln't find any clue of MSDN help.
    I found some hints of www.sockets.com.
    However, I couldn't make Exe file because the link is something wrong
    partly because library def file comes from VC1.52.

    Even though this code uses user id and password, this code use
    Socket level program and use command line and you may expand
    this code to ACCT. This code never use API function.

    Because I can't do access of main frame ftp server, I can't
    confirm my code even though I try to do it.

    Now, I'm so curiou of how WS_FTP was written.
    Regards.
    -Masaaki Onishi-







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