Error 17

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
pro510
Posts: 33
Joined: Fri May 06, 2005 2:18 pm

Error 17

Post by pro510 » Tue Mar 15, 2011 3:08 pm

We have been using SmartFTP library version 1.5 for several years now. We recently upgraded to version 2 because of a random crashing error in 1.5. Version 2.0 fixed the crashing error, but now we have a new issue. On rare occassions, we get an Error 17 - ftpErrorLicense. This will continue to happen until our application is restarted. The code to initialize the license key has not changed from 1.5. The code we use to write the licence key is show below and we only call this once at the start of our application.

Any suggestions on what this may be?

Thanks,
Graham

Code: Select all

sfFTPLib::IGlobalPtr pGlobal; 



if (SUCCEEDED(pGlobal.CreateInstance(__uuidof(sfFTPLib::Global)))) 

{ 

    // Load the licence file into the DLL 

    if (pGlobal->LoadLicenseKeyData(_szLicence)) 

    { 

        m_bCreated = TRUE; 

    } 

    else 

    { 

        AfxMessageBox(_T("Failed to load FTP license key data."), MB_ICONERROR); 

    } 

} 

else 

{ 

    AfxMessageBox(_T("FTP not found."), MB_ICONERROR); 

}

pro510
Posts: 33
Joined: Fri May 06, 2005 2:18 pm

Re: Error 17

Post by pro510 » Tue Mar 15, 2011 3:24 pm

The licence key for version 2.0 is 400133629

pro510
Posts: 33
Joined: Fri May 06, 2005 2:18 pm

Re: Error 17

Post by pro510 » Tue Mar 15, 2011 3:26 pm

I should also have mentioned that the LoadLicenseKeyData succeeds, but when we try to connect we get the error 17.

mb
Posts: 12030
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Error 17

Post by mb » Tue Mar 15, 2011 3:43 pm

Can you provide a sample which reproduces the problem?

pro510
Posts: 33
Joined: Fri May 06, 2005 2:18 pm

Re: Error 17

Post by pro510 » Tue Mar 15, 2011 5:30 pm

There is no reliable way to reproduce the problem. During our testing we have seen the issue about 5 times - out of probably hundreds of times which we've ran our application. It was not isolated to one machine.

Even though the chances of this happening are slim, we don't know how this will affect customers, so are holding off releasing an update to the software which includes the latest ftp lib until we know more.

I can send you the C++ class I use that wraps your library, but I can't send sample code that you can run that triggers the error.

Graham
Last edited by pro510 on Tue Mar 15, 2011 5:32 pm, edited 1 time in total.

mb
Posts: 12030
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Error 17

Post by mb » Tue Mar 15, 2011 6:06 pm

Ultimately we need a way to reproduce it.

Try to enable logging:
pGlobal->LogFile = _T("c:\\temp\\sfFTPLib.log");

If the license key fails to load, additional debug information is written to the .log file.

pro510
Posts: 33
Joined: Fri May 06, 2005 2:18 pm

Re: Error 17

Post by pro510 » Tue Mar 15, 2011 6:32 pm

The logging has been enabled since we first discovered the issue. The log is empty other than one line that shows the version of the library.

mb
Posts: 12030
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Error 17

Post by mb » Tue Mar 15, 2011 7:38 pm

Have you ever tried to put the LoadLicenseKeyData() function into a loop with 1M iterations?

pro510
Posts: 33
Joined: Fri May 06, 2005 2:18 pm

Re: Error 17

Post by pro510 » Thu Mar 17, 2011 4:27 pm

No I haven't. We have not seen LoadLicenseKeyData() fail. That has always succeeded and we just get error 17 when we try to connect to an ftp server.

mb
Posts: 12030
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Error 17

Post by mb » Thu Mar 17, 2011 6:41 pm

I assume that you are calling LoadLicenseKeyData() just once and not for every new connection. If this is the case, did you try to reproduce the problem by repetitively calling Connect()? E.g. from different threads.

Post Reply