User (Old forums)MemberAugust 24, 2005 at 2:12 pmPost count: 23064
Since a couple of days, I have a Windows Forms app using an FtpClient class that throws me an Xceed.Ftp.FtpAbortException.
It is thrown in an AsyncCallback (SendFileCompleted) called at the end of BeginSendFile. This is the exact error:
SendFileCompleted failed due to error: Xceed.Ftp.FtpAbortException: The current operation was aborted. —> Xceed.Ftp.FtpInvalidStateException: The FtpCommandChannel is not connected.
at Xceed.Ftp.Engine.FtpCommandChannel.SendString(String command)
at Xceed.Ftp.Engine.FtpDataConsumerCommand.SendCommand(FtpCommandChannel commandChannel)
Now, what does the ‘The FtpCommandChannel is not connected’ actually mean? Is the the connection that is not really finished, while I am already trying to upload or download things?
Thanks for any small insight,
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by panik (had 2630 views)User (Old forums)MemberAugust 27, 2005 at 7:12 pmPost count: 23064
The Xceed documentation does a pretty good job of explaining this part of FTP – in particular, the area you’ll want to look at is their discussion on “Passive” vs “Active” transfers.
The FTP Command channel referred to is the channel that is used to send and receive commands to the FTP server. Most servers these days are aggressively closing command channels that remain open for extended periods. The consequence being that you’ll be transferring a large file, and though the transfer continues to work, the command channel will have been closed by the server. The only way you know that the command channel has died is when you’re done with the transfer, the system (i.e. your client code) refuses to acknowledge the receipt or sending of the file via a “226 Transfer Complete” response from the command channel. In the case of synchronous transfers, your client hangs. In the case of asychronous transfers, you get an exception. See http://www.xceedsoft.com/Forums/ShowPost.aspx?PostID=2517 for some more discussions on how to work around this.
You’re likely going to want to handle the error as it occurs – and then test to see whether the sent bytes are the same as the size of the sent file, at the least. You won’t be able to check the size on the server without reopening the command channel. Reopening the command channel will require logging into the server again.
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by rbellamy (had 3343 views)
- You must be logged in to reply to this topic.