I have an application written in .NET 3.5 that uses FTP to upload/download files from a server. The app works fine but there are performance issues:
It take
Debug Network
A few tricks for simple network debugging:
tracert
from a DOS shell).ftp
command.telnet server 21
.The results will provide clues to solving the problem.
Network Hardware
For a slow trace route:
Network Configuration
For a slow ping:
Validate API
A slow command-line FTP session will tell you that the problem is not isolated to the FTP API you are using. It does not eliminate the API as a potential problem, but certainly makes it less likely.
Network Errors
If packets are being dropped between the source and destination, ping will tell you. You might have to increase the packet size to 1500 bytes to see any errors.
FTP Queue Server
If you have no control over the destination FTP server, have an intermediary server receive uploaded files. The intermediary then sends the files to the remote server at whatever speed it can. This gives the illusion that the files are being sent quickly. However, if the files must exist on the remote server as soon as they are uploaded, then this solution might not be viable.
FTP Server Software
Use a different FTP daemon on the FTP server, such as ProFTPd as a Windows service. (ProFTPd has plug-ins for various databases that allow authentication using SQL queries.)
FTP Server Operating System
A Unix-based operating system might be a better option than a Microsoft-based one.
FTP Client Software
There are a number of different APIs for sending and receiving files via FTP. It might take some work to make your application modular enough that you can simply plug in a new file transfer service. A few different APIs are listed as answers here.
Alternate Protocol
If FTP is not an absolute requirement, try: