C# IsGenuine working inconsistentlyAnswered

I've run into an using TurboActivate inside our application.

For testing purposes, I've set both the daysBetweenChecks and graceDaysOnInetErr to 0.

As long as the internet connection is available, TA.IsGenuine(0,0) returns IsGenuineResult.Genuine.

My issue appears after the internet connection is disabled). TA.IsGenuine(0,0) will return IsGenuineResult.InternetError the first time it is called, but will return IsGenuineResult.NotGenuine after that. It will also never return IsGenuineResult.Genuine afterwareds, even if the internet connection is restored (even after the application is restarted).

The only way to fix this appear to be to deactivate and reactivate the license.

Is this a known issue and is there a way to fix/avoid it?

We are developing on Windows 10.

Answer

Don’t set those to 0. Even for testing purposes. You will get unusual behavior.

Follow the C# example for how to handle errors from the genuine functions.

I've tried again with both the daysBetweenChecks and graceDaysOnInetErr set to 1, and after 3 days of no internet access I still get IsGenuineResult.InternetError during the first IsGenuine check and IsGenuineResult.NotGenuine during any subsequent checks.

Also, what is the proper way to reverify after gettinga a NotGenuine result? 

Trying IsGenuine again will always return NotGenuine.

The only way I've found so far is to do a Deactivate(), then Activate() again.