Product activated even after deactivation

Just signed up and testing your API. All seemed to work fine using your demo in the API, but then I deactivated a licence from the web portal rather than through the sample app and now the sample always tells me the product activation is genuine when it’s been deactivated. To try to fix, Deleted the product key from the server, but the sample app still keeps telling me the product is genuinely activated. Need to understand what’s going on quickly.

Hi,

When you deactivate the license through dashboard, your app won’t deactivate on the client instantly, until the server sync occurs. Server sync occurs every 90 days by default but you can set it to one day in LexActivator API.

Dear support team,

I got the same issue. If this happens, the only recommended way is using server refresh? it sounds like I need to add a button saying “Refresh request” because I think server sync period should be set to reasonably long usually for user’s convenience.

Is there any to forcibly deactivate the machine in client end by removing certain file or reg key?? Or, it is not recommended to do so?

please let me know.

Hi,

If you want a forceful instant deactivation, this can be done using Lexactivator API function DeactivateProduct() function. It deactivates client side and sends the deactivation request to the server.

Increasing server sync frequency won’t impact your app as it occurs in a separate thread.

If you want to implement a force refresh button just invoke ActivateProduct() on button press and it will do a force sync.

Hi, Thank you for your answer.

It does not work… DeactivateProduct failed with LA_FAIL (1) because the product is already deactivated through dashboard.

Let me restate the situation: “I deactivated a licence from the dashboard rather than through the sample app and now the sample always tells me the product activation is genuine when it’s been deactivated”

Is there any instant way to make the sample program noticed that the license is deactivated?
Seemingly, calling DeactivateProduct does not work in this situation.

DeactivateProduct will return LA_FAIL if the product is already deactivated through dashboard. So you either deactivate it through dashboard or DeactivateProduct ()

If it is deactivated through dashboard DeactivateProduct () will still deactivate it client side, though it returns an error code.

I would recommend setting the server sync frequency to 1 day, if that is ok for you. It does’t have any overhead, as it occurs in a separate thread.

Hello,
Thank you for your reply.

If it is deactivated through dashboard DeactivateProduct () will still deactivate it client side, though it returns an error code.

That is weird… because the sample program still says “Product genuienly activated!” even after hitting Deactivate button which calls DeactivateProduct() and the sample program is restarted. Seemingly, client side deactivation is not happening…

I would recommend setting the server sync frequency to 1 day, if that is ok for you. It does’t have any overhead, as it occurs in a separate thread.

What will happen if I set server sync frequency to 1 day, and the machine is disconnected from the network for long enough like a couple of days? Will it deactivate the license by itself due to server sync fails for long time?

Please let me know

Hello,

What will happen if I set server sync frequency to 1 day, and the machine is disconnected from the network for long enough like a couple of days? Will it deactivate the license by itself due to server sync fails for long time?

Please refer to documentation of SetGracePeriodForNetworkError()

/*
FUNCTION: SetGracePeriodForNetworkError()

PURPOSE: Sets the grace period for failed re-validation requests sent
by IsProductGenuine() function, caused due to network errors.

It determines how long in days, should IsProductGenuine() function retry
contacting CryptLex Servers, before returning LA_GP_OVER instead of LA_OK.

To ignore grace period pass 0 as the grace period. This may be useful in
case of offline activations or higher sync frequency.

PARAMETERS:
* gracePeriod - length of the grace period in days

RETURN CODES: LA_OK

*/

That is weird… because the sample program still says “Product genuienly activated!” even after hitting Deactivate button which calls DeactivateProduct() and the sample program is restarted. Seemingly, client side deactivation is not happening…

I was wrong in this case. If deactivation occurs server side, while client is active, DeactivateProduct() currently doesn’t deactivate client side. It gets deactivated on server sync only.

Hello,
Thank you for your prompt reply.

Please refer to documentation of SetGracePeriodForNetworkError()

Got it. I will configure based on our customer’s expectation, then.

I was wrong in this case. If deactivation occurs server side, while client is active, DeactivateProduct() currently doesn’t deactivate client side. It gets deactivated on server sync only.

Got it . Thank you for your info.

Thank you very much for your support!