Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.2k views
in .NET FTP by (1.5k points)
Hi
I'm trying out the edtFTPnet Pro component with sftp.
I can get synchronous transfers to work ok but but I'm having great difficulty with asynchronous methods.
I'm using some of the sample code from 'How to use asynchronous methods' example in the example viewer -

sftpConnection.BeginConnect(New AsyncCallback(AddressOf OnConnect), sftpConnection)

followed eventually by -

Private Sub OnConnect(ByVal ar As IAsyncResult)
Dim c As SecureFTPConnection = CType(ar.AsyncState, SecureFTPConnection)
c.EndConnect(ar)
AddToList("Connect completed", True)
End Sub 'OnConnect


My problem is that the OnConnect sub is never fired. The app cycles through all the main 'Begin' operations and then just waits there for the Signaller event to fire, which it never does.
As I said, it all works fine in synchronous mode so all my connections are ok.
The 'How to use asynchronous methods' example in the example viewer works ok too.

Is it possible to obtain the sample code as a VB application?
I'm new to .net and threading is a bit of an unknown to me. The complete working 'How to use asynchronous methods' example app code would be a huge help in my understanding of whats going on.

I'd really appreciate any help.

Regards
Malcom

2 Answers

0 votes
by (162k points)
Hi, can you email us the log file resulting when you run your test app to support at enterprisedt dot com?

The help has a How to on enabling logging.

Are you using exactly the same source from the Example Viewer? If you don't mind zipping up your test proj (assuming it is just running this code and doesn't have loads of other stuff) and emailing it to us we'll take a look.
0 votes
by (1.5k points)
Many Thanks Bruce

Its a rather large app so I'll trim off a heap of unrelated stuff and get it to you along with the log files.

Thanks again

Malcom

Categories

...