CopyToAnotherServerAsync not working inside a loop

+1 vote
asked Oct 5, 2013 by kaycee1 (230 points)
edited Dec 4, 2013

i'm trying to fxp a list of items using the following code:

foreach (var item in slist)
{   
        await sourceFtpHandler.Ftp.CopyToAnotherServerAsync(destinationFtpHandler.Ftp,
                                                        item.Name,
                                                        string.Format("{0}/{1}",destinationPath, item.Name));
}

the problem is that the first file is copied well.. but after that i get an error:

Failed TLS negotiation on data channel (using SSL_connect()), disconnected: Success (435).

i tried to switch the order of the list to see that it's not a particular file, and it always success to copy the first file, and gives error on the second.

please assist.

Applies to: Rebex FTP/SSL

3 Answers

0 votes
answered Oct 8, 2013 by Tomas Knopp (58,580 points)
edited Dec 4, 2013
 
Best answer

Hello, we have improved the SSCN mode handling in FXP. Please download the hotfix and let us know, if it works for you now. If the code still fails, please send us a new log.

UPDATE

The fix has been released as part of Rebex 2013R3 FTP/SSL version. For more information about the new version see blogpost. You can check release notes for complete list of changes in Rebex FTP/SSL component.

commented Oct 8, 2013 by kaycee1 (230 points)
edited Oct 8, 2013

is it possible to have 4.5 assemblies ?

commented Oct 8, 2013 by Tomas Knopp (58,580 points)
edited Oct 8, 2013

Just use those from net-4.0 directory. They're compatible with both .NET 4.0 and .NET 4.5.

commented Oct 8, 2013 by kaycee1 (230 points)
edited Oct 8, 2013

Exception is: FileLoadException - Could not load file or assembly 'Rebex.Ftp, Version=4.0.4981.0, Culture=neutral, PublicKeyToken=1c4638788972655d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

commented Oct 8, 2013 by Tomas Knopp (58,580 points)
edited Oct 8, 2013

In your VS project, please remove all references to the Rebex libraries, clean the project, then add the references to the hotfix assemblies (all three of them - Common, Networking and Ftp). Then rebuild. It should be working now.

commented Oct 8, 2013 by kaycee1 (230 points)
edited Oct 8, 2013

i don't know about those libraries still getting the manifest error but i can tell the problem is solved. i tried it on a new project and all files were transferred successfully !

commented Oct 8, 2013 by Tomas Knopp (58,580 points)
edited Oct 8, 2013

Great to hear it works! Thank you. The procedure to succesfully upgrade to the hotfix is the same as in this article which describes how to upgrade from trial to full version (in your case you upgrade from ordinary version to hotfix version). You could also try to delete the old dll's from your computer completely and a complete solution clean might also be needed as a trace of the old dll might be somewhere in the bin directory and causing the problems you described.

0 votes
answered Oct 7, 2013 by Tomas Knopp (58,580 points)
edited Oct 7, 2013

Please create a log of the communication as described in this article and either post the log here, or send it to support@rebex.net. We will be able to look into your issue then. Thanks!

commented Oct 7, 2013 by kaycee1 (230 points)
edited Oct 7, 2013

sent via email

commented Oct 7, 2013 by Tomas Knopp (58,580 points)
edited Oct 7, 2013

Thank you for the log file, we will get back to you today.

0 votes
answered Oct 7, 2013 by Tomas Knopp (58,580 points)
edited Oct 8, 2013

We have examined the log and here are our findings:

In fact everything goes fine in the log except for the last error in secondary and primary FTP server

2013-10-07 12:06:11.223 INFO Ftp(1)[13] Response: 435 Failed TLS negotiation on data channel (using SSL accept()), disconnected
2013-10-07 12:06:11.223 INFO Ftp(2)[13] Response: 435 Failed TLS negotiation on data channel (using SSL connect()), disconnected: Success.

Both the servers have notified Rebex FTP client about these error, but we cannot read anything more from it than reported by the servers...

We do not have (and cannot possibly find out from the Rebex FTP client point of view) why the negotiation between the two servers has failed.

One possible way to find this piece of information is to look into the actual FTP server logs.

Could you also try if the FXP between those two servers works with another FTP client? (e.g. FlashFXP has support for FXP).

If you can make FXP work with another FTP client, please create the log of the communication and send it to us.

commented Oct 7, 2013 by kaycee1 (230 points)
edited Oct 7, 2013

Hi, i attached flash fxp log via email. thanks.

commented Oct 8, 2013 by Tomas Knopp (58,580 points)
edited Oct 8, 2013

Thank you for the log, we will get back to you today.

...