LexActivator.GetLicenseMeterAttribute doesn't fail if offline

We’re using Meter Attributes to limit the amount customers can use certain features in our app. So, we need to check the current Total Uses of the Meter Attribute from the server before letting the user take certain actions. If the user is offline, an error should be thrown. I would expect LexActivator.GetLincenseMeterAttribute to throw an error if the user is offline. However, there is no error thrown… does that mean it’s getting the info from an offline cache? If so, how do we force it to get the latest info from the server instead?

This is using the latest version of LexActivator for C#

Hi,

LexActivator.GetLicenseMeterAttribute() does not return an error if the user is offline, because it gets data from the local cache.

But incrementing the meter attribute by 0 before calling LexActivator.GetLicenseMeterAttribute() will refresh the cached data so that LexActivator.GetLicenseMeterAttribute() can get you the latest info and will also return an error LA_E_NET (or throw an exception in case of C#) if the user is offline.