IsProductActivated method returns 1

Hello,
I am using LexActivator V2.9.0(C#). I have a question.

In my application, I wanted to be disable retry on network error, so I added the following processing.
status = LexActivator.SetGracePeriodForNetworkError(0);

As a result, my application occurs a error only on a certain machine.
On the machine activated online, The next method executed at application startup will return 1 (LA_FAIL).
status = LexActivator.IsProductActivated();

If I activate online after occurrence of the phenomenon, that day will operate normally. Even if I start the application several times on the day and execute the following process, the method returns 0 normally.
status = LexActivator.IsProductActivated();

However, IsProductActivated method returns 1 again when the application is started for the first time the next day.

As a result of my investigation, the phenomenon occurred when the following processing existed, and no phenomenon occurred unless the following processing existed. There is no other difference in source code.
status = LexActivator.SetGracePeriodForNetworkError (0);

This phenomenon only occurs on a certain machine.
Machine environment is Windows10x64, .NET Framework 4.6.2 and Internet connection is possible. This phenomenon does not occur on other machines of the same environment.

In my application, I wanted to be disable retry on network error, so I want to add the following processing. However, this phenomenon occurs. How can I avoid it?
status = LexActivator.SetGracePeriodForNetworkError (0);

Below is the source code to be executed at application startup.

var status = LexActivator.SetProductFile(_ProductFilePath);
if (status != LexActivator.LA_OK)
{
	throw new Exception(status);
}
status = LexActivator.SetVersionGUID(_VersionGuid, LexActivator.PermissionFlags.LA_USER);
if (status != LexActivator.LA_OK)
{
	throw new Exception(status);
}
status = LexActivator.SetUserLock(true);
if (status != LexActivator.LA_OK)
{
	throw new Exception(status);
}
status = LexActivator.SetDayIntervalForServerCheck(1);
if (status != LexActivator.LA_OK)
{
	throw new Exception(status);
}
status = LexActivator.SetGracePeriodForNetworkError(0);
if (status != LexActivator.LA_OK)
{
	throw new Exception(status);
}
status = LexActivator.IsProductActivated();
if (status != LexActivator.LA_OK)
{
	throw new Exception(status);
}
status = LexActivator.IsProductGenuine();
if (status != LexActivator.LA_OK)
{
	throw new Exception(status);
}

Hi,

This doesn’t disable retry on network error. It just ensures LA_GP_OVER is never returned, i.e. unlimited grace period.

IsProductActivated() doesn’t make a network call, it always checks locally.
LexActivator.SetGracePeriodForNetworkError(0)won't affect this function at all. It only affects the behavior ofIsLicenseGenuine()` function.

In your code, you are invoking LexActivator.IsProductActivated() as well as LexActivator.IsProductGenuine(), which is not required at all. Internally, LexActivator.IsProductGenuine() first invokes LexActivator.IsProductActivated() itself and if success code is returned, it spawns a thread for server sync if it is the due date.

Are you restarting the machine? The issue seems to be a machine fingerprint issue. If the license was activated, and it’s returning 1 status code, it’s most probably a fingerprint issue. The machine is returning different details on restart.

This doesn’t disable retry on network error. It just ensures LA_GP_OVER is never returned, i.e. unlimited grace period.

Sorry.
I made a mistake in writing. Your answer is consistent with my understanding.

In your code, you are invoking LexActivator.IsProductActivated() as well as LexActivator.IsProductGenuine(), which is not required at all.

Thank you.
This has nothing to do with the cause of the phenomenon, but I understood that there is waste in the source code.

Are you restarting the machine? The issue seems to be a machine fingerprint issue. If the license was activated, and it’s returning 1 status code, it’s most probably a fingerprint issue. The machine is returning different details on restart.

The machine restarted.
However, no phenomena occur when restarting before one day passes. The phenomenon occurred after 1 day passed.
The machine on which the phenomenon occurs is an environment created in my company uniformly, there are other machines on which the OS settings and installed applications are the same. I do not recognize the setting of machine fingerprint change.Do the machine fingerprint change mean specifically what data change?

As a result of my investigation, the phenomenon occurred when the following processing existed, and no phenomenon occurred unless the following processing existed. There is no other difference in source code.
status = LexActivator.SetGracePeriodForNetworkError (0);

As mentioned above, whether or not the phenomenon occurs depends on whether SetGracePeriodForNetworkError (0) is executed or not.
If the machine fingerprint has changed every time it is restarted, it will not change whether this phenomenon occurs due to this source code change or not.
Therefore, I think there is a cause for the phenomenon when executing SetGracePeriodForNetworkError (0). I want to know how to avoid the problem caused by that cause.

I have an idea about how to avoid it.
I think that the following source code is almost the same as executing SetGracePeriodForNetworkError (0). If this source code can avoid it, I will try to use this. Is this source code problematic?
status = LexActivator.SetGracePeriodForNetworkError (Int32.MaxValue);

Hi,

Yes, you can set the following LexActivator.SetGracePeriodForNetworkError (Int32.MaxValue - 1), this should also delay the grace period to almost unlimited time.

Hello.

I have an idea about how to avoid it.
I think that the following source code is almost the same as executing SetGracePeriodForNetworkError (0). If this source code can avoid it, I will try to use this. Is this source code problematic?
status = LexActivator.SetGracePeriodForNetworkError (Int32.MaxValue);

LexActivator.SetGracePeriodForNetworkError (Int32.MaxValue - 1) could not avoid the phenomenon.

As mentioned above, whether or not the phenomenon occurs depends on whether SetGracePeriodForNetworkError (0) is executed or not.
If the machine fingerprint has changed every time it is restarted, it will not change whether this phenomenon occurs due to this source code change or not.
Therefore, I think there is a cause for the phenomenon when executing SetGracePeriodForNetworkError (0). I want to know how to avoid the problem caused by that cause.

By the above and SetGracePeriodForNetworkError (Int32.MaxValue - 1), I think that the phenomenon is caused by executing SetGracePeriodForNetworkError.
The phenomenon occurred when the following processing existed, and no phenomenon occurred unless the following processing existed. There is no other difference in source code.

status = LexActivator.SetGracePeriodForNetworkError (0);
or
status = LexActivator.SetGracePeriodForNetworkError (int32.MaxValue - 1);

Please answer the following two questions.

(1) What is the reason that IsProductActivated returns 1 on a certain machine when SetGracePeriodForNetworkError is executed?

(2) I want to execute SetGracePeriodForNetworkError (0) or SetGracePeriodForNetworkError (Int32.MaxValue - 1) when my application is activated offline. However, when the application executes SetGracePeriodForNetworkError, the phenomenon occurs on a certain machine.
What is the way to avoid this?

I checked the source code for v2, calling this function stores the grace period value in registry key. And this value is read in IsProductGenuine() function to decide whether to do a server sync or return LA_GP_OVER. It doesn’t do anything else at all, hence I doubt it is causing an issue.

Simply, don’t execute this function at all, and consider LA_GP_OVER a success code similar to LA_OK.

Hello.

Simply, don’t execute this function at all, and consider LA_GP_OVER a success code similar to LA_OK.

Thank you.I try it.

In case server validation fails due to network error, it retries every 15 minutes. If it
continues to fail for fixed number of days (grace period), the function returns LA_GP_OVER
instead of LA_OK. The default length of grace period is 30 days and this can be changed if required.

IsProductGenuine() is descripted as above.
Is it only in the above cases to return LA_GP_OVER? Is not there anything else?

RETURN CODES: LA_OK, LA_EXPIRED, LA_REVOKED, LA_GP_OVER, LA_FAIL, LA_E_GUID, LA_E_PKEY

IsProductActivated() is descripted as above.
I recognized that the explanation is not described about LA_GP_OVER.
When does this method return LA_GP_OVER?

Yes, it only returns LA_GP_OVER if activation is valid (LA_OK) but it has failed to sync with the server for given number of days.

I suppose you are not using this method, as this is redundant as already discussed. Ideally, it should never be invoked. This method will never return LA_GP_OVER. There is a typo in the docs.

Sorry.
Even if I did not execute SetGracePeriodForNetworkError (), the phenomenon occurred.
Until now, it did not occur if SetGracePeriodForNetworkError () was not executed, but it occurred when checking for some days.
So I do not think whether to execute SetGracePeriodForNetworkError () or not is the cause of that phenomenon.

Therefore, the following problem can not be solved.
IsProductActivated() returns 1 on a certain machine when the application is started for the first time the next day

I expect that the machine fingerprint will change when one day passes.
How can I check whether the machine fingerprint has changed?

Hi,

Does calling ActivateProduct() work for the same license or you need to deactivate the license activation, to use the license key again, after it returns 1.

It can be due to machine resetting the registry key entries on restart made by Lexactivator to save the licensing data.

Therefore, the following problem can not be solved.
IsProductActivated() returns 1 on a certain machine when the application is started for the first time the next day

About the above, I explain supplementarily.
If I activate online or offline after occurrence of the phenomenon, that day will operate normally. Even if I start the application several times on the day and execute the following process, IsProductActivated() returns 0 normally.
However, IsProductActivated() returns 1 again when the application is started for the first time the next day.

I expect that the machine fingerprint will change when one day passes.
How can I check whether the machine fingerprint has changed?

So I want to check if machine fingerprint was changed or not when one day passed.

Had machine fingerprint changed, it would have required you to deactivate the license activation server side, before activating it again in the client.

The machine where problem is occurring, is somehow resetting the registry data which was set by the client.

Hi.

Had machine fingerprint changed, it would have required you to deactivate the license activation server side, before activating it again in the client.

On the machine where the phenomenon occurred, I did not need to deactivate the license activation server side.
“Date Activated” of the machine did not be changed on cryptlex.com Activations screen when activating again after occurrence of the phenomenon.
As this result, is that machine fingerprint has not been changed on machines where phenomena occur?

The machine where problem is occurring, is somehow resetting the registry data which was set by the client.

What is this registry data?

The license data is stored in windows registry. Following is the path where the licensing data is stored:

HKEY_CURRENT_USER\SOFTWARE\CLASSES\vsetz

If data in this registry key is removed by the system, IsProductActivated() will return 1. On Activation note the data under this key using regedit.exe and when IsProductActivated() returns 1, check at that time.