-
-
Notifications
You must be signed in to change notification settings - Fork 684
Troubleshooting
Very Common Issues
- Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host
- Timed out trying to read data from the socket stream!
- FTPS not working on Linux since SSL session resumption is not supported
Common Issues
- I'm getting login errors but I can login fine in Firefox/Filezilla
- FluentFTP fails to install in Visual Studio 2010 : 'System.Runtime' already has a dependency defined for 'FluentFTP'.
- 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.
- I cannot delete a file if the filename contains Russian letters. FileZilla can delete this file without problems.
- I keep getting TimeoutException's in my Azure WebApp
- Many commands don't work on Windows CE
- After successfully transfering a single file with OpenWrite/OpenAppend, the subsequent files fail with some random error, like "Malformed PASV response"
- SSL Negotiation is very slow during FTPS login
FluentFTP fails to install in Visual Studio 2010 (VS2010) > 'System.Runtime' already has a dependency defined for 'FluentFTP'.
Your VS has an older version of nuget.exe so it cannot properly install the latest FluentFTP. You must download nuget.exe` manually and run these commands:
cd D:\Projects\MyProjectDir
C:\Nuget\nuget.exe install FluentFTP
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.
Set the connection encoding manually to ensure that special characters work properly.
The default codepage that you should use is 1252 Windows Western. It has support for English + European characters (accented characters).
client.Encoding = System.Text.Encoding.GetEncoding(1252); // ANSI codepage 1252 (Windows Western)I cannot delete a file if the filename contains Russian letters. FileZilla can delete this file without problems.
Set the connection encoding manually to ensure that special characters work properly.
For Russian you need to use the codepage 1251 Windows Cyrillic
client.Encoding = System.Text.Encoding.GetEncoding(1251); // ANSI codepage 1251 (Windows Cyrillic)I keep getting TimeoutException's in my Azure WebApp
First try reducing the socket polling interval, which Azure needs.
client.SocketPollInterval = 1000;If that doesn't work then try reducing the timeouts too.
client.SocketPollInterval = 1000;
client.ConnectTimeout = 2000;
client.ReadTimeout = 2000;
client.DataConnectionConnectTimeout = 2000;
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.
Many commands don't work on Windows CE
According to this 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.
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.
SSL Negotiation is very slow during FTPS login
FluentFTP uses SslStream under the hood which is part of the .NET framework. SslStream uses a feature of windows for updating root CA's on the fly, which can cause a long delay in the certificate authentication process. This can cause issues in FluentFTP related to the SocketPollInterval property used for checking for ungraceful disconnections between the client and server. This MSDN Blog covers the issue with SslStream and talks about how to disable the auto-updating of the root CA's.
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.
Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host
This means that on the server the [FTP daemon] service isn't running (probably not the case) or the service is currently still busy performing another operation. It almost sounds like the server is returning a message indicating it is still performing the last operation.
Try reducing the polling interval to ensure that the connection does not time-out.
client.SocketPollInterval = 1000;- Auto Connection
- Auto Reconnection
- FTP(S) Connection
- FTP(S) Connection using GnuTLS
- FTPS Proxies
- Custom Servers
- Custom Commands
- v40 Migration Guide