SocketError: WSAECONNRESET An existing connection was forcibly closed by the remote host.

Question:

What is this error message?

How can I avoid such error message in the future?

ChilkatLog:
    ChangeRemoteDir:
	DllDate: Sep 1 2009
	UnlockPrefix: ABC123FTP
	Username: something
	Component: .NET 2.0
	dir: /
	SocketError: WSAECONNRESET An existing connection was forcibly closed by the remote host.
	Error sending on socket
	send_size: 7
	Failed to send CWD command
	Failed.

Answer:

This indicates that the server disconnected at some point in time after the last successful Chilkat method call, but prior to this method call.  In other words, the Chilkat component tried to send the FTP command on the socket, but found the socket to be already disconnected by the server.  You’ll need to examine the server-side logs to  determine the server’s reason for disconnecting.  One common reason is when the connection is inactive for too long.  You might avoid this condition by periodically calling Noop when your application might otherwise be idle.

Also, a good way to get information about an error is to Google the key words and also include “Chilkat” in the search terms.  For example, Googling “WSAECONNRESET Chilkat” produces this search result:

http://www.example-code.com/vbdotnet/ftp_WSAECONNRESET.asp

Which provides detailed information about one specific case...