I have a winform that handles the creation and login of the AsyncFtpClient. I need to upload multiple files at the same time while returning progress for each file. For example, I have 10 files and I need to start 10 uploads to run simultaneously with Async updates to their respective progress bars.
I got one file upload working correctly. The main form creates the FTP object and logs in. Once logged in I create a new thread that then adds a UserControl that houses the send file FTP commands etc… to a panel. When adding the UserControl I pass in the created FTP object, the local folder to pull the file from and the file name to upload. This works great for one file. I tried using 2 files and creating 2 threads which adds 2 UserControls to the panel. This works fine up to the point where the send happens. The FTP object sends back an error when attempting to send the second file “the connection is in use”. I know this object supports sending multiple files but it seems to send them one after another not simultaneously. I need to send my files simultaneously.
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Dan (had 3088 views)