IsGenuine usage when retrying to connect

I have an interesting issue that I ran into when testing the case where my program is disconnected from the internet.

Background: I am using TurboActivate in a C# WPF program. I am using verified trials, and am trying to test some of the functionality, along with dialog boxes, in order to verify that my program's interaction with TurboActivate is appropriate. I use TurboActivate.IsGenuine(90,14, false) as the primary method for checking for a valid license.

The problem: I created a code for a verified trial and activated my copy of the program with it. All went well. Then I altered my license check to be TurboActivate.IsGenuine(0,14, false), and then disconnected my computer from the internet so I could simulate the case where the "daysBetweenChecks" ran out and the user was disconnected (but still had some time in the grace period). I got the appropriate "InternetError" response from IsGenuine, and that worked fine. Now I have a dialog box at this point that pops up and asks the user if they want to try to connect to the server again. If they do want to try again, then I call TurboActivate.IsGenuine(0,14, false) again, and respond appropriately to the result.

So when I tested, I disconnected from the internet, opened the program, got the "Do you want to retry" message, reconnected to the internet, and then clicked "Yes" on my dialog, which initiated a call to TurboActivate.IsGenuine(0,14, false). Interestingly enough, the TurboActivate.IsGenuine(0,14, false) call returned InternetError again! I closed my program and re-opened it, and the original call to TurboActivate.IsGenuine(0,14, false) again returned InternetError, seemingly not recognizing the internet connection.

So I then I tried replacing the call to TurboActivate.IsGenuine(0,14, false) completely with a call to TurboActivate.IsGenuine(). This worked.

Now I am aware that your documenation recommends to call TurboActivate.IsGenuine() with no arguments when you do a re-try. But I wasn't aware that this was required? What exactly is going on here? Is my method of testing this case flawed, and that is what is causing the issues?

"Do you want to retry" message, reconnected to the internet, and then clicked "Yes" on my dialog, which initiated a call to TurboActivate.IsGenuine(0,14, false). Interestingly enough, the TurboActivate.IsGenuine(0,14, false) call returned InternetError again!

Right, TurboActivate doesn't retry connecting to the internet for 5 hours is the IsGenuineEx() call fails with an Internet Error. We should make this clearer. We do this to prevent hammering of our servers.

To retry immediately, have the "Yes" or "Retry" button call IsGenuine() (with no parameters). This retries immediately with no caching.

Does that make sense?

That makes sense. Though, consider the case where the user chooses not to re-try (since they don't have a connection where they are). Then they try to re-connect an hour later with an internet connection (as in, they re-open our program).

Considering this use-case, it seems like then I would need to store the fact that there was an InternetError in a file somewhere on the user's computer, and then make sure to run IsGenuine() instead of IsGenuine(90,14, false) the next time the user opens my program (provided we are within the 5 hr period, of course). Otherwise, the user would get another "Could not connect to the internet. Do you want to try again?" message if they open the program within the 5 hr period, whether or not they actually are connected to the internet.

I suppose an alternative could be that whenever I open my program and IsGenuine(90,14,false) gives an Internet error, I could immediately call IsGenuine to confirm that it is indeed an internet error and not just Turboactivate deciding not to contact the server (within the 5 hr limit). But that could result in increased traffic to you guys (though I don't anticipate it being significant).

What is the right solution here? Or are both good solutions?

As a side comment, why would it be important to set the 5 hr period anyways? I guess I don't see why it is a problem to try over and over if there truly is an internet connection problem- no failed connection to the server would actually get to the server in the first place, right? And if the server was down temporarily, then it isn't receiving any of the failed requests anyways, so I guess I wouldn't think that it would be "hammered". Forgive my ignorance if I'm overlooking something- my expertise isn't in servers or communications programming. I'm just curious as to this feature.

Otherwise, the user would get another "Could not connect to the internet. Do you want to try again?" message if they open the program within the 5 hr period, whether or not they actually are connected to the internet.

We should improve the examples to show you exactly how to handle this. What you should do is say "Failed to re-verify with the activation servers in the last five hours. Do you want to try again now?"

But that could result in increased traffic to you guys (though I don't anticipate it being significant).

It would be increased traffic to the customer's network.

no failed connection to the server would actually get to the server in the first place, right?

It depends on the type of the failure. It also depends on who gets the blunt of the hammering.

Ok, that makes sense.