At first sight, it resembles a firewall problem.
There are two channels opened when communicating with an FTP server. A command channel, on which all commands are sent and received, and data channel, on which all the actual data (files) are transfered.
The problem comes form the fact that while the file is being transfered on the data channel, nothing is being sent or received on the command channel. If this goes on for a long period of time, the firewall, not seeing any data go through on the command channel, can close it, thinking it is not in use any more. Therefore, when the server or the client wants to communicate on the command channel, it cannot do it since it is closed, thus the exception.
You can do one of two things. Either setup the firewall so its timeout period is long enough, so it does not close the command channel while the transfer is still going on.
Or use the KeepAliveInterval property on FtpClient. When this property is set, a NOOP command is sent on the command channel at the interval at which the property is set, which keeps the command channel active, so the firewall does not close it.
André
Software Developer and Tech Support
Xceed Software Inc.