I've now got the log output of the error (I have obviously blocked out sensitive information)...
ALL [FTPConnection] 2 Mar 2007 16:42:30.250 : Invoking delegate EnterpriseDT.Net.Ftp.FTPConnectionEventHandler
ALL [FTPConnection] 2 Mar 2007 16:42:30.250 : Finding MainWindowHandle
ALL [FTPConnection] 2 Mar 2007 16:42:30.265 : MainWindowHandle found
ALL [FTPConnection] 2 Mar 2007 16:42:30.265 : Have GUI control
ALL [FTPConnection] 2 Mar 2007 16:42:30.265 : GUI control invocation required
ALL [FTPConnection] 2 Mar 2007 16:42:30.265 : Invoking delegate asynchronously using GUI control
DEBUG [HostNameResolver] 2 Mar 2007 16:42:30.265 : www.*****.co.uk resolved to 87.***.***.***
DEBUG [FTPClient] 2 Mar 2007 16:42:30.265 : Connecting to 87.***.***.***:21
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.375 : 220 Microsoft FTP Service
ALL [FTPConnection] 2 Mar 2007 16:42:30.375 : Invoking delegate EnterpriseDT.Net.Ftp.FTPConnectionEventHandler
ALL [FTPConnection] 2 Mar 2007 16:42:30.375 : Have GUI control
ALL [FTPConnection] 2 Mar 2007 16:42:30.375 : GUI control invocation required
ALL [FTPConnection] 2 Mar 2007 16:42:30.375 : Invoking delegate asynchronously using GUI control
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.375 : ---> USER *****
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.453 : 331 Password required for ******.
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.453 : ---> PASS ********
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.515 : 230 User ***** logged in.
DEBUG [FTPConnection] 2 Mar 2007 16:42:30.515 : Successfully logged in
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.515 : ---> TYPE I
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.609 : 200 Type set to I.
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.609 : ---> PWD
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.656 : 257 "/" is current directory.
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.656 : ---> CWD FTP/WebShopServer/TEST/
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.734 : 250 CWD command successful.
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:30.734 : ---> PWD
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:31.031 : 257 "/FTP/WebShopServer/TESTSHOP" is current directory.
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:31.031 : ---> SIZE WebShopAttachFiles_DataUploadAttachments_1.zip
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:31.093 : 550 WebShopAttachFiles_DataUploadAttachments_1.zip: The system cannot find the file specified.
ALL [FTPConnection] 2 Mar 2007 16:42:31.093 : Invoking delegate EnterpriseDT.Net.Ftp.FTPFileTransferEventHandler
ALL [FTPConnection] 2 Mar 2007 16:42:31.093 : Have GUI control
ALL [FTPConnection] 2 Mar 2007 16:42:31.093 : GUI control invocation required
ALL [FTPConnection] 2 Mar 2007 16:42:31.093 : Invoking delegate synchronously using GUI control
ALL [FTPConnection] 2 Mar 2007 16:42:31.125 : Delegate invocation complete
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:31.125 : NewActiveDataSocket(0)
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:31.125 : ---> PORT 192,***,****,****,****
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:31.171 : 200 PORT command successful.
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:31.171 : ---> STOR WebShopAttachFiles_DataUploadAttachments_1.zip
DEBUG [FTPControlSocket] 2 Mar 2007 16:42:31.250 : 150 Opening BINARY mode data connection for WebShopAttachFiles_DataUploadAttachments_1.zip.
DEBUG [FTPActiveDataSocket] 2 Mar 2007 16:42:31.343 : AcceptConnection() succeeded
ERROR [FTPClient] 2 Mar 2007 16:42:31.343 : Caught exception : System.IO.IOException: Unable to write data to the transport connection.
System.IO.IOException: Unable to write data to the transport connection.
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.BinaryWriter.Write(Byte[] buffer, Int32 index, Int32 count)
at EnterpriseDT.Net.Ftp.FTPClient.PutBinary(Stream srcStream, String remoteFile, Boolean append, Boolean alwaysCloseStreams)
CAUSED BY:
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
ALL [FTPConnection] 2 Mar 2007 16:42:31.343 : Invoking delegate EnterpriseDT.Net.Ftp.FTPFileTransferEventHandler
ALL [FTPConnection] 2 Mar 2007 16:42:31.343 : Have GUI control
ALL [FTPConnection] 2 Mar 2007 16:42:31.343 : GUI control invocation required
ALL [FTPConnection] 2 Mar 2007 16:42:31.343 : Invoking delegate asynchronously using GUI control
Does that give you any clue as to what's happening - and more importantly, if I can stop it happening?
It happens if I'm using a single FTPConnection or multiple FTPConnections (one per managed thread)
It's not a persistant error, but persistant to be really, really annoying.
Cheers,
Tom :)