Archived Forum Post

Index of archived forum posts

Question:

FileZilla Works but My Application Does Not?

Sep 29 '17 at 10:19

How can it be that FileZilla can make a connection, or upload/download files fine, but my application does not?


Answer

When FileZilla installs, it adds a rule to the Windows Firewall to ensure all communications originating from it's .exe are NOT blocked.

When you build and run your application, there is no such rule for your .exe. The typical case is that a rule may already exist for the FTP control ports (21 and 990). But FTP data connections use ports dynamically allocated from the ephemeral port range:

An ephemeral port is a short-lived endpoint that is created by the operating system when a program requests any available user port. The operating system selects the port number from a predefined range, typically between 1024 and 65535, and releases the port after the related TCP connection terminates.

If Windows Firewall does not block the FTP control ports (21 and 990), then your application can establish the connection, but it cannot list directories, or upload/download files because the data connections are blocked.

You need to add a rule to Windows Firewall to prevent your application from being blocked.