A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/robinrodricks/FluentFTP/wiki/Automatic-Connection below:

Automatic Connection · robinrodricks/FluentFTP Wiki · GitHub

Tip: For detailed documentation refer to the IntelliSense tips that appear when you call a given API method.

How do I auto-connect to an FTP or FTPS server?

Use this code:

FtpClient client = new FtpClient(hostname, username, password); // or set Host & Credentials
client.AutoConnect();
How do I auto-detect the correct connection settings?

Use this code:

FtpClient client = new FtpClient(hostname, username, password); // or set Host & Credentials
var profiles = client.AutoDetect();

// if any profiles are found, print the code to the console
if (profiles.Count > 0){
	var code = profiles[0].ToCode();
	Console.WriteLine(code);
}

Once you find a working connection profile, use the generated code to quickly connect to your FTP server.

In what order of preference does an auto connection follow?

Auto connection attempts to find working connection settings in this order of preference:

Protocol Preference:

  1. Explicit FTPS (TLS) - very common
  2. Plaintext FTP - very common
  3. Implicit FTPS (SSL) - outdated and very rare

FTPS Protocol Preference:

  1. Tls12 | Tls11 - TLS 1.2 or TLS 1.1 (TLS 1.3 is not yet stable in .NET Framework)
  2. Tls - TLS 1.0
  3. Default - Undefined/weird behaviour

Data Connection Type Preference:

Encoding Type Preference:

What properties does an auto connection generate?

Auto connection automatically calculates the best values for the following properties in FtpClient:

  1. Port (unless a non-standard port is specified before calling AutoConnect)
  2. EncryptionMode
  3. SslProtocols
  4. DataConnectionType
  5. Encoding

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4