Jump to content


Photo

Scripts, license and trial


  • Please log in to reply
2 replies to this topic

#1 Olivier Bonnet

Olivier Bonnet
  • Members
  • 1 posts

Posted 12 April 2011 - 09:17 AM

Hi,

I am evaluating SmartFTP.
We are looking for a solution to make automatic our transfers with a FTPS server.

And I have two questions:
  • The difference of the scripting between SmartFTP Pro and the FTP Library. I have understood that the difference is that, with the FTP library, we are allowed to deploy the dll. Do you confirm?
  • For test purpose I have done a script in C#. I am still in the valid trial periode.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using sfFTPLib;
    
    namespace Notilus
    {
        class Program
        {
            static void Main(string[] args)
            {
                /*sfFTPLib.Global global = new sfFTPLib.Global();
                if (global.LoadLicenseKeyData("..."))
                    System.Console.WriteLine("License key verified.");
                else
                    System.Console.WriteLine("Failed to verify license key.");*/
    
                // Create our COM object through the Interop
                FTPConnectionMTA ftp = new FTPConnectionMTA();
    
                // host settings
                ftp.Host = "*****";
                ftp.Port = 21;
                ftp.Username = "*****";
                ftp.Password = "*****";
                ftp.Passive = true;
    
                // connect to host
                sfFTPLib.enumError err = ftp.Connect();
                if (err == sfFTPLib.enumError.ftpErrorSuccess)
                {
                    System.Console.WriteLine("Youpi!");
                    ftp.Disconnect();
                }
                else
                {
                    if (err == sfFTPLib.enumError.ftpErrorLicense)
                        System.Console.WriteLine("Please acquire a license from http://www.smartftp.com");
                    else
                        System.Console.WriteLine("Connect() failed. LastError = {0}", ftp.LastError);
                }
    
            }
        }
    }
    With this code, I receive always a license error (the famous error 17). Even if I uncomment the license part.
    Do you know what is wrong in my script?

Thanks

Olivier
Saint-Gobain PPC

#2 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 12 April 2011 - 09:47 PM

>difference
Yes and you cannot directly access the FTP Library from the FTP client.

>trial
The trial has expired.

#3 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 16 April 2011 - 01:22 AM

>trial
You may want to try it again with the latest version:
http://www.smartftp.com/download/
It should give you another 30 day.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users