C# SDK ftpErrorLicense problem

Two questions...

1. I have been evaluating the C# SDK for connecting to a remote server for the past couple of weeks. Today, I can connect with my client application (which says I have 6 days left during the trial). When I try connecting to the remote server with the exact same information via the SDK I get a ftpErrorLicense error. There doesn't appear to be any meaningful information in the logs. Does the SDK trial expire before the client trial? That is the only thing that I can think of that would cause this behavior.

this is the code that *used* to work
[codebox]SFTPConnection _sftp = new SFTPConnection();

_sftp.Host = _config.SFTPHost;
_sftp.Port = _config.SFTPPort;
_sftp.Username = _config.SFTPUsername;
_sftp.Password = _config.SFTPPassword;

sfFTPLib.KeyManager keyManager = new KeyManager();
_sftp.PrivateKey = keyManager.LoadFile(_config.PrivateKeyLocation, "");

// set CLNT name
_sftp.Client = _config.SFTPClientName;
// log everything
_sftp.LogFile = _config.SFTPLogFileLocation;
_sftp.Proxy.Type = enumProxyType.ftpProxyTypeNone;

// connect to host
sfFTPLib.enumError err = _sftp.Connect();[/codebox]

this is the only line in the log file
[codebox][20080717 16:05:15] SmartFTP FTP Library v1.5.13.30[/codebox]

2. I notice that using the SFTPConnection object that there isn't a "ChangeDirectory" method along with a few other differences compared to the FTPConnection class. Is there another method for iterating through the remote directories for SFTP connections?

Please advise.


1. You need to create the FTPConnection object through the Application.CreateObject() as described in the SmartFTP Client SDK.

SmartFTP.Application objApplication = new SmartFTP.Application();

sfFTPLib.FTPConnection newItem = (sfFTPLib.FTPConnection)objApplication.CreateObject("sfFTPLib.FTPConnectionMTA");

You cannot directly create the object if you have no license for the FTP Library.

2. You need to use the ReadDirectory function with the absolute path to the folder.


I don't understand. The code I posted above worked just fine a week ago when I was working on this. Unaltered, the code now produces the licensing error. I do not wish to interact with the SmartFTP client at all if possible. The C# code I have written will be included into a Windows Service server on which it runs will not have the client application installed. Is this possible?


Yes but in thise case you have to purchase a license for the FTP Library. Otherwise you have to create your object through SmartFTP.exe.


My company will be purchasing the Library license today (hopefully). I'll let you know after further testing how it works out. I'm hoping that this is nothing more than a licensing issue. I've been very happy with everything up until this point.


Let me know if you have any other problems. The FTP Library product is running in trial mode for 30 days. That's why you didn't notice any problems before.