Archived Forum Post

Index of archived forum posts


NumFilesAndDirs fails after long delay?

Oct 08 '12 at 08:29

Using FileZilla I can connect and see the directory on this server, using FTP2 it seems to lock on a NumFilesAndDirs call, the connection was made ok.

port 21
passive mode
protocol: AUTH/TLS


The NumFilesAndDirs property access fetches the directory listing, and this is technically a data transfer that uses a data connection just like a file transfer (upload or download). Therefore, if FileZilla works, then it must be that the settings are different. The easiest thing to try is to switch from passive to non-passive by setting the Passive property = 0/false. If that doesn't solve the problem, see this:

PS> The remote directory listing is cached in-memory, so that the next access does not re-fetch the listing. If the current remote directory is changed, then the in-memory cache is cleared so that the next NumFilesAndDirs access fetches the listing for the new current remote directory.