Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.8k views
in .NET FTP by (460 points)
Ok,

I've gathered some brain dumps from the MSDN Articles on using Begin/End operations etc. However there are times when we hit the End<method> and it throws any pending Exceptions that I'm getting TargetInvocationException and I have to check the InnerException to get the real exception. Is this consistent with the rest of the methods and can I structure my exceptionhandling to always check the InnerException and only catch TargetInvokcationException for the Async handlers?

            try
            {
                ((SecureFTPConnection)ar.AsyncState).EndDownloadFile(ar);
            }
            catch (TargetInvocationException te)
            {
                if(te.InnerException is FTPTransferCancelledException)
                    InvokeTransferCancelledEvent();

            }


Or should I still catch it? I'm a bit confused. :oops:

4 Answers

0 votes
by (162k points)
We've uploaded a fix to this to the same URL you have downloaded from previously.
0 votes
by (460 points)
thanks! I will give this a shot in the morning.
0 votes
by (162k points)
i.e. you should no longer get TargetInvocationException
0 votes
by (460 points)
yay! now its working as its meant to :-)

Categories

...