Hi,
I'm evaluating your control for use in our application, I'm not sure if I'm allowed to post questions if I'm trialing this control but here goes.
I've had a look through the object model and the way the product works. So far I'm very impressed :-)
There are a few concerns though, one is that if I SFTP into a linux box it doesnt resolve symlinks. I tried your example viewers InstantFtp Client, connected fine but one folder we use for our internal use has lots of links to other areas on the system (this is an 'easy' method for the admins) but the client wont navigate to those links. Is this a bug in the control or something we can work around?
The other thing is the Begin/End methods. I'm not 100% comfortable with the Microsoft practices just yet, so if you know of an article (already tried google and MSDN Multithreading like another topic suggested to no avail) please let me know.
What I'm really keen on knowing is the "best practice" for handling the Begin/End methods. Are they queued up if we call multiple items?
m_FtpConnection.BeginConnect(null,null);
m_FtpConnection.BeginGetFeatures(null,null);
m_FtpConnection.BeginGetFileInfos(null,null);
Or do we branch out and do it step by step in the AsyncCallBack handler? As in:
m_FtpConnection.BeginConnect(new AsyncCallback(OnConnected), m_Connection);
private void OnConnected(IAsyncResult ar)
{
try
{
SecureFTPConnection connection = ar.AsyncState as SecureFTPConnection;
Debug.Assert(connection != null, "Connection was NULL");
connection.EndConnect(ar);
if (connection.Protocol != FileTransferProtocol.SFTP)
connection.BeginGetFeatures(null, null);
connection.BeginGetFileInfos(null, null);
}
catch (FTPException fex)
{
MessageBoxEx.Show(this, fex.ToString());
}
}
Then inside either of those Begin methods we carry to the next task (AutoLogin = true!)?
Then theres exceptions, where do we handle the exceptions? I tried to simulate one by setting the timeout to be 500ms, connecting to a bogus port and waited till it returned, but only the Error handler executed rather than try/catch and raised a CLR exception (Unhandled). I'm sure this will become clearer once I learn the Microsoft Begin/End methods.
Thanks for any light you can shed in my corner. My trial license expires early next month, is there a way of extneding it so I can play with it a bit more before I submit a proposal to purchase the non-source version?