login about faq

I'm trying to connect to an FTP server, but the Connect method fails with reason 200 (Connected, but failed to receive greeting from FTP server). After that the client is disconnected (IsConnected = false) and I cannot issue any commands.

For the same server, using FileZilla, I have to set the "Default Remote Directory" to a provided value and it works (otherwise it also fails).

How can I achieve connecting to a default directory, using the Chilkat library? In my case I cannot issue a CWD command, because the client needs to be connected.

Follows the log from Chilkat library (replaced sensitive information with *):

  Connect_Ftp2:
    DllDate: Aug 15 2013
    ChilkatVersion: 9.4.1.42
    UnlockPrefix: Test
    Username: ***
    Architecture: Little Endian; 32-bit
    Language: .NET 4.0
    VerboseLogging: 1
    ProgressMonitoring:
      enabled: yes
      heartbeatMs: 0
      sendBufferSize: 65536
    --ProgressMonitoring
    ImplicitSsl: 0
    AuthTls: 0
    AuthSsl: 0
    Hostname: ***
    Port: 21
    IdleTimeoutMs: 15000
    ConnectTimeout: 15
    ConnectTimeoutMs_1: 15000
    calling ConnectSocket2
    IPV6 enabled connect with NO heartbeat.
    connectingTo: ***
    resolveHostname1:
      Resolving domain name (IPV4) via gethostbyname
    --resolveHostname1
    GetHostByNameHB_ipv4: Elapsed time: 312 millisec
    myIP_1: ***
    myPort_1: 52338
    connect successful (1)
    Turning on TCP_NODELAY.
    socketOptions:
      SO_SNDBUF: 8192
      SO_RCVBUF: 8192
      TCP_NODELAY: 1
    --socketOptions
    readFtpControlChannelReply:
      rcvUntilMatchStringQP: =0A
      dbReceived0: 
      Timeout waiting to read socket or accept connection
      timeoutMs: 15000
      recvUntilMatch: Socket timeout.
      Failed to read FTP response line..
    --readFtpControlChannelReply
    initialStatus: -1
    initialResponse: 
    Failed to connect to FTP server.
    Failed.
  --Connect_Ftp2
--ChilkatLog

asked Jan 21 '14 at 04:56

alfoks's gravatar image

alfoks
8226

edited Jan 21 '14 at 05:24


Eventually it was as simple as increasing the IdleTimeoutMs from 15000 to 60000. Spend 3 hours on this. I feel so stupid!

link

answered Jan 21 '14 at 09:08

alfoks's gravatar image

alfoks
8226

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×131
×98

Asked: Jan 21 '14 at 04:56

Seen: 1,506 times

Last updated: Jan 21 '14 at 09:08

powered by OSQA