Skip to content

Commit

Permalink
add seperators in FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
robinrodricks committed Oct 11, 2017
1 parent 53f0745 commit cc9cee5
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ void OnValidateCertificate(FtpClient control, FtpSslValidationEventArgs e) {
}
```

--------------------------------------------------------
<a name="faq_ftps"></a>
**How do I validate the server's certificate when using FTPS?**

Expand All @@ -618,6 +619,7 @@ void OnValidateCertificate(FtpClient control, FtpSslValidationEventArgs e) {
}
```

--------------------------------------------------------
<a name="faq_ccc"></a>
**How do I connect with FTPS and then switch back down to plaintext FTP?**

Expand All @@ -629,13 +631,14 @@ Set this option before calling Connect() or any other method on the FtpClient cl
client.PlainTextEncryption = true;
```


--------------------------------------------------------
<a name="faq_sftp"></a>
**How do I connect with SFTP?**

SFTP is not supported as it is FTP over SSH, a completely different protocol. Use [SSH.NET](https://github.com/sshnet/SSH.NET) for that.


--------------------------------------------------------
<a name="faq_loginanon"></a>
**How do I login with an anonymous FTP account? / I'm getting login errors but I can login fine in Firefox/Filezilla**

Expand All @@ -644,12 +647,14 @@ Do NOT set the `Credentials` property, so we can login anonymously. Or you can m
client.Credentials = new NetworkCredential("anonymous", "anonymous");
```

--------------------------------------------------------
<a name="faq_loginproxy"></a>
**How do I login with an FTP proxy?**

Create a new instance of `FtpClientHttp11Proxy` or `FtpClientUserAtHostProxy` and use FTP properties/methods like normal.


--------------------------------------------------------
<a name="faq_progress"></a>
**How can I track the progress of file transfers?**

Expand Down Expand Up @@ -682,18 +687,21 @@ client.DownloadFile(localPath, remotePath, true, FluentFTP.FtpVerify.Retry, prog
```


--------------------------------------------------------
<a name="faq_uploadbytes"></a>
**How can I upload data created on the fly?**

Use Upload() for uploading a `Stream` or `byte[]`.


--------------------------------------------------------
<a name="faq_downloadbytes"></a>
**How can I download data without saving it to disk?**

Use Download() for downloading to a `Stream` or `byte[]`.


--------------------------------------------------------
<a name="faq_throttle"></a>
**How can I throttle the speed of upload/download?**

Expand All @@ -704,6 +712,7 @@ Set the `UploadRateLimit` and `DownloadRateLimit` properties to control the spee
- UploadFiles() / DownloadFiles()


--------------------------------------------------------
<a name="faq_verifyhash"></a>
**How do I verify the hash/checksum of a file and retry if the checksum mismatches?**

Expand Down Expand Up @@ -731,6 +740,7 @@ All the possible configurations are:
- `FtpVerify.Retry | FtpVerify.Delete | FtpVerify.Throw` - Verify checksum, retry copying X times, delete target file if still mismatching, then throw an error


--------------------------------------------------------
<a name="faq_uploadmissing"></a>
**How do I upload only the missing part of a file?**

Expand All @@ -741,6 +751,7 @@ Using the new UploadFile() API:
client.UploadFile("C:\bigfile.iso", "/htdocs/bigfile.iso", FtpExists.Append);
```

--------------------------------------------------------
<a name="faq_append"></a>
**How do I append to a file?**

Expand Down Expand Up @@ -774,6 +785,7 @@ using (FtpClient conn = new FtpClient()) {
```


--------------------------------------------------------
<a name="faq_downloadlow"></a>
**How do I download files using the low-level API?**

Expand All @@ -799,6 +811,8 @@ using (var remoteFileStream = client.OpenRead(remotePath, FtpDataType.Binary)){
client.GetReply();
```


--------------------------------------------------------
<a name="faq_utf"></a>
**How can I upload/download files with Unicode filenames when my server does not support UTF8?**

Expand All @@ -824,6 +838,7 @@ Here is the full list of codepages based on the charset you need:
- 1258 – English + Vietnamese


--------------------------------------------------------
<a name="faq_listings"></a>
**How does GetListing() work internally?**

Expand All @@ -844,6 +859,7 @@ Here is the full list of codepages based on the charset you need:
3. And if none of these satisfy you, you can fallback to **name listings** (NLST command), which are *much* slower than either LIST or MLSD. This is because NLST only sends a list of filenames, without any properties. The server has to be queried for the file size, modification date, and type (file/folder) on a file-by-file basis. Name listings can be forced using the `FtpListOption.ForceNameList` flag.


--------------------------------------------------------
<a name="faq_hashing"></a>
**What kind of hashing commands are supported?**

Expand All @@ -854,6 +870,7 @@ Support for the MD5 command as described [here](http://tools.ietf.org/html/draft
Support for the HASH command has been added to FluentFTP. It supports retrieving SHA-1, SHA-256, SHA-512, and MD5 hashes from servers that support this feature. The returned object, FtpHash, has a method to check the result against a given stream or local file. You can read more about HASH in [this draft](http://tools.ietf.org/html/draft-bryan-ftpext-hash-02).


--------------------------------------------------------
<a name="faq_trace"></a>
**How do I trace FTP commands for debugging?**

Expand All @@ -878,6 +895,7 @@ FtpTrace.LogIP = false; // hide FTP server IP addresses
```


--------------------------------------------------------
<a name="faq_logfile"></a>
**How do I log all FTP commands to a file for debugging?**

Expand All @@ -902,6 +920,7 @@ FtpTrace.LogIP = false; // hide FTP server IP addresses
```


--------------------------------------------------------
<a name="faq_logfile2"></a>
**How do I log only critical errors to a file?**

Expand All @@ -916,6 +935,7 @@ FtpTrace.AddListener(new TextWriterTraceListener("log_file.txt"){
```


--------------------------------------------------------
<a name="faq_logfunc"></a>
**How do I disable logging of function calls?**

Expand All @@ -925,6 +945,7 @@ FtpTrace.LogFunctions = false;
```


--------------------------------------------------------
<a name="faq_hidelog"></a>
**How do I omit sensitive information from the logs?**

Expand All @@ -934,6 +955,7 @@ Use these settings to control what data is included in the logs:
- `FtpTrace.LogIP` - Log FTP server IP addresses?


--------------------------------------------------------
<a name="faq_log"></a>
**How do I use third-party logging frameworks like NLog?**

Expand Down Expand Up @@ -988,12 +1010,14 @@ Attaching via configuration file:
```
--------------------------------------------------------
<a name="faq_etsdc"></a>
**What does `EnableThreadSafeDataConnections` do?**
EnableThreadSafeDataConnections is an older feature built by the original author. If true, it opens a new FTP client instance (and reconnects to the server) every time you try to upload/download a file. It used to be the default setting, but it affects performance terribly so I disabled it and found many issues were solved as well as performance was restored. I believe if devs want multi-threaded uploading they should just start a new BackgroundWorker and create/use FtpClient within that thread. Try that if you want concurrent uploading, it should work fine.
--------------------------------------------------------
<a name="faq_fork"></a>
**How can I contribute some changes to FluentFTP? / How do I submit a pull request?**
Expand All @@ -1019,6 +1043,8 @@ First you must "fork" FluentFTP, then make changes on your local version, then s
18. Click **Create pull request**
19. Thank you!
--------------------------------------------------------
<a name="faq_certs"></a>
**How do I use client certificates to login with FTPS?**
Expand All @@ -1041,6 +1067,8 @@ And ensure that:
2. You do not use pem certificates, use p12 instead. See this [Stack Overflow thread](http://stackoverflow.com/questions/13697230/ssl-stream-failed-to-authenticate-as-client-in-apns-sharp) for more information. If you get SPPI exceptions with an inner exception about an unexpected or badly formatted message, you are probably using the wrong type of certificate.
--------------------------------------------------------
<a name="faq_x509"></a>
**How do I bundle an X509 certificate from a file?**
Expand Down Expand Up @@ -1101,6 +1129,8 @@ Your VS has an older version of `nuget.exe` so it cannot properly install the la
> cd D:\Projects\MyProjectDir\
> C:\Nuget\nuget.exe install FluentFTP
--------------------------------------------------------
<a name="trouble_specialchars"></a>
**After uploading a file with special characters like "Caffè.png" it appears as "Caff?.bmp" on the FTP server. The server supports only ASCII but "è" is ASCII. FileZilla can upload this file without problems.**
Expand All @@ -1112,6 +1142,8 @@ The default codepage that you should use is `1252 Windows Western`. It has suppo
client.Encoding = System.Text.Encoding.GetEncoding(1252); // ANSI codepage 1252 (Windows Western)
```
--------------------------------------------------------
<a name="trouble_specialchars2"></a>
**I cannot delete a file if the filename contains Russian letters. FileZilla can delete this file without problems.**
Expand All @@ -1123,6 +1155,8 @@ For Russian you need to use the codepage [`1251 Windows Cyrillic`](https://en.wi
client.Encoding = System.Text.Encoding.GetEncoding(1251); // ANSI codepage 1251 (Windows Cyrillic)
```
--------------------------------------------------------
<a name="trouble_azure"></a>
**I keep getting TimeoutException's in my Azure WebApp**
Expand All @@ -1143,18 +1177,23 @@ client.DataConnectionReadTimeout = 2000;
If none of these work, remember that Azure has in intermittent bug wherein it changes the IP-address during a FTP request. The connection is established with IP-address A and for the data transfer Azure uses IP-address B and this isn't allowed on many firewalls. This is a known Azure bug.
--------------------------------------------------------
<a name="trouble_windowsce"></a>
**Many commands don't work on Windows CE**
According to [this](https://msdn.microsoft.com/en-us/library/ms881872.aspx) from MSDN the Windows CE implementation of FTP is the bare minimum, and open to customization via source code. Many advanced commands such as CHMOD are unsupported.
--------------------------------------------------------
<a name="trouble_getreply"></a>
**After successfully transfering a single file with OpenWrite/OpenAppend, the subsequent files fail with some random error, like "Malformed PASV response"**
You need to call `FtpReply status = GetReply()` after you finish transfering a file to ensure no stale data is left over, which can mess up subsequent commands.
--------------------------------------------------------
<a name="trouble_ssl"></a>
**SSL Negotiation is very slow during FTPS login**
Expand All @@ -1163,6 +1202,7 @@ FluentFTP uses `SslStream` under the hood which is part of the .NET framework. `
FluentFTP logs the time it takes to authenticate. If you think you are suffering from this problem then have a look at Examples\Debug.cs for information on retrieving debug information.
--------------------------------------------------------
<a name="trouble_closedhost"></a>
**Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host**
Expand Down

0 comments on commit cc9cee5

Please sign in to comment.