FTP

.NET Framework provides comprehensive support for the FTP protocol with the FtpWebRequest and FtpWebResponse classes. These classes are derived from WebRequest and WebResponse. In most cases, the WebRequest and WebResponse classes provide all that's necessary to make the request, but if you need access to the FTP-specific features exposed as properties, you can typecast these classes to FtpWebRequest or FtpWebResponse.

Note

This article is specific to projects that target .NET Framework. For projects that target .NET 6 and later versions, FTP is no longer supported.

Examples

For more information, see the following topics: How to: Download Files with FTP, How to: Upload Files with FTP, and How to: List Directory Contents with FTP.

FTP and proxies

If a proxy (specified by the Proxy property) is an HTTP proxy, then only the DownloadFile, ListDirectory, and ListDirectoryDetails commands are supported.