Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.2k views
in .NET FTP by
I am making a large amount of rapid connections and file transfers in my application. At times the application will hang while I am trying to ftpClient.Connect();. I have solved this so far by re-using connections, but this does not give me comfort that it will not hang do to other users connecting at a similar time to the same server. Any ideas on why this is happening. It sounds kind of similar to the problem in http://www.enterprisedt.com/forums/viewtopic.php?t=872, but I don't get the SocketException.

Wuzitsay

3 Answers

0 votes
by
How many connections are you making and in what period of time?

- Hans (EDT)
0 votes
by
I had about 30 files. This is the old pattern where I had the problem.

foreach( fileName in fileList )
{
LoadFile( fileName );
}

private void LoadFile(fileName)
{
try
{
//Instantiate FTPClient
//Setup FTPClient
//Connect
//Change Dir as needed
//Get File
}
catch
{ //blah }
finally
{
//Quit
}
}

Wuzitsay
0 votes
by
As you've said yourself already, you're much better off using a single connection, but that doesn't explain why it hung. The Developer's Guide has a section on logging. Would you please enable DEBUG level logging and post the last part of the log. Also, the source code is included in the distribution so you could try and compile it with your application and use the debugger to investigate the hanging behavior.

- Hans (EDT)

Categories

...