Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

March 28, 2008

FTP NumFilesAndDirs Hanging?

Question:
The method ftp.NumFilesAndDirs is hanging up. I am not getting any errors. We are running in as a console executable. Do you have any ideas. The connection string and directory it points to all were fine, just not getting the number of files back.

Answer:
When NumFilesAndDirs is accessed, the Chilkat FTP2 component may need to fetch a directory listing from the FTP server. It would only need to do this if the remote directory was changed via the ChangeRemoteDir method, or if the ListPattern property was updated.

If a directory listing is fetched, there might be a delay while this is happening. If your application is setup to receive AbortCheck events, these events will be fired while this is happening.

In FTP, downloading a directory listing is (in effect) the same as a file transfer — in the sense that a data connection is established for sending the directory listing. If your Active/Passive setting is wrong for your situation, then the establishment of the data connection could be blocked and the NumFilesAndDirs will hang for the length of time according to the ConnectTimeout property settings. If this happens, check to see if switching from Active mode to Passive mode solves the problem.


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.