After I transfer my file successfully and when I try to disconnect, I get this: Xceed.Ftp.FtpIOException: An I/O error occurred while sending a command. —> System.Net.Sockets.SocketException: An existing co nnection was forcibly closed by the remote host
When you disconnect, both the server and client will attempt to disconnect at the same time. Sometimes the server wins the race and the socket is closed before the client expected it. Best way to deal with it is to wrap the .Disconnect() in a Try/Catch statement and ignore the thrown exception.
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Steven (had 3935 views)