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

January 24, 2006

Active vs. Passive FTP Mode


I use the FTP2 component for building a module to upload a file with ftp to an ftp server. (I’m developing in ASP.NET with Visual Studio 2003) I am having trouble uploading files to the FTP server.

Try setting the Ftp2.Passive property = false. This will cause an "active" data connection. Quite often, firewalls block all incoming ports except for a few well-known ones (HTTP, email-related ports, etc.). When an FTP data transfer happens, a data connection is established between the client and server. With a passive connection, the server listens on a socket at a randomly selected port and the client connects. This is the incoming connection that is probably getting blocked by a firewall. With an active connection, the client listens on a socket and the server initiates the data connection. Because the connection is initiated by the server, it is not blocked. This will probably solve your problem (setting Passive = false).

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

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