Hey Neil,
It all depends on how you're using the code. Without any snippets of your "checking" code, I won't be able to tell you anything.
A good place to start is our example apps. They show the best practices for using TurboActivate in your app.
Hi, I have an oddity here. We have a couple of accounts, one for testing and one for a live app, and both are playing up. Here are the details from my test account:
I had an activated installation of my application, ISIS, on my pc.I disconnected the internet and ran ISIS - ISIS said not genuine and expired - I was expecting a "not connected to the internet" message.I ran Turboactivate (offline) and it immediately said activated but ISIS still said not genuine and expired.I connected to internet - ISIS still said not genuine/expired.I deactivated the code through the Lime website - ISIS still said not genuine/expired.I ran Turboactivate (online) and it said activated but ISIS still said not genuine/expired.I used the Turboactivate deactivate function and to deactivate on my system and forget the code.I ran Turboactivate (online), typed in the same code as I had been using and it went off then said activated. This time ISIS said genuine and let me in.
This is all very odd and worrying. We have users of a live application who are also receiving "not genuine" messages even though they have been using it activated for months. Any ideas what is going on?
Neil
Hey Neil,
It all depends on how you're using the code. Without any snippets of your "checking" code, I won't be able to tell you anything.
A good place to start is our example apps. They show the best practices for using TurboActivate in your app.
Sorry, of course. It is all based on your examples, and has worked flawlessly for 4 months now.
I call the main check routine:
CheckLimeTrial()
Friend Sub CheckLimeTrial() Dim gr As New IsGenuineResult
Try ' Check if we're activated, and every 90 days verify it with the ' activation servers. In this example we won't show an error if ' the activation was done offline. (see the 3rd parameter of ' the IsGenuine() function) 'TurboActivate.Deactivate(True) gr = TurboActivate.IsGenuine(0, 1, True) '90,14 If gr = IsGenuineResult.InternetError Then MessageBox.Show("do something to handle 'not online'") End If isLimeActivated = (gr = IsGenuineResult.Genuine _ OrElse gr = IsGenuineResult.GenuineFeaturesChanged _ OrElse gr = IsGenuineResult.InternetError) Catch ex As TurboActivateException MessageBox.Show("Failed to check if activated: " + ex.Message) End Try
If isLimeActivated Then Dim b As Boolean b = Security.WinTrust.WinTrust.VerifyEmbeddedSignature(My.Application.Info.DirectoryPath & IO.Path.DirectorySeparatorChar & "TurboActivate.dll") If Not b Then MsgBox("There is an error. Contact your supplier.") End End If
' your app is activated and genuine If gr = IsGenuineResult.InternetError Then 'TODO: give the user the option to retry the genuine ' checking immediately. For example a dialog box. ' In the dialog call IsGenuine() to retry immediately. End If Dim featureValue As String Try featureValue = TurboActivate.GetFeatureValue("haspcode") Catch featureValue = "cZEjI2j4FdyTC8zXoiv9Nw==" End Try sLime = clsEncrypt.DecryptString(featureValue).Split("-") If IsNothing(sLime) OrElse sLime.GetUpperBound(0) <> 3 Then MsgBox("There is an error. Contact your supplier.") End End If Dim dFeature As Date Try featureValue = TurboActivate.GetFeatureValue("expirydate") If featureValue.Length > 0 Then dFeature = Date.FromOADate(clsEncrypt.DecryptString(featureValue)) Else dFeature = Nothing Catch ex As Exception dFeature = Nothing End Try Dim nDateDiff As Integer = DateDiff(DateInterval.Day, Date.Today, dFeature) Select Case True Case dFeature = Nothing Case nDateDiff < 1 Dim f As New frmAccess2 f.ShowDialog() Case nDateDiff < 8 Dim f As New frmDateLimit If nDateDiff = 1 Then f.smsg1 = "You are running a date limited version of the software." & vbNewLine & ("This copy is valid for another 7 days.").Replace("7", nDateDiff.ToString).Replace(GetLocalString("days"), GetLocalString("day")) & vbNewLine & GetLocalString("After this it will require reactivation.") Else f.smsg1 = "You are running a date limited version of ISIS." & vbNewLine & ("This copy is valid for another 7 days.").Replace("7", nDateDiff.ToString) & vbNewLine & GetLocalString("After this it will require reactivation.") End If f.ShowDialog() End If Case Else
End Select Else ' TODO: Not genuine or not activated. Either way you should either ' restrict the user from using your app or give the user a trial ' of your app. TurboActivate.UseTrial(TurboActivate.TA_Flags.TA_USER Or TurboActivate.TA_Flags.TA_DISALLOW_VM)
Dim featureValue As String = "cZEjI2j4FdyTC8zXoiv9Nw==" sLime = clsEncrypt.DecryptString(featureValue).Split("-") Dim f As New frmTrial f.ShowDialog() End If End Sub
Hi Sam
any ideas what is causing my problem?
As a follow up, I've done some more digging. If I let my "no internet" days grace expire, when I next connect to the internet, it marks my app as Not Genuine, even though the code is still marked activated on the web page. I have to deactivate then reactivate it. Why is that?
Neil
Well, for starters you shouldn't use a "0" days between checks for IsGenuine(). That's why you're getting an error when a user isn't connected to the internet.
We recommend sticking with our default values. Namely, a 90 days between checking and a 14 day grace period.
E.g.:
gr = TurboActivate.IsGenuine(90, 14, True)
Thanks, I know that, but while writing the app and in particular putting the Lime code in I need to have it check every time I run it. Anyway, surely that can't be causing the "Not Genuine" message when I do connect
Neil
That's how that particular overload of IsGenuine() works (IsGenuineEx() on other languages). If you open the function definition you'll see this behavior explained clearly.
If you want IsGenuine() to contact the LimeLM servers on every single run and to return the "InternetError" every time it fails, then call IsGenuine() with no parameters. Of course we don't recommend that for production.
Thanks, SamI think we have gone off track. When it goes live I shall only check the server every 60 days, with 14 days grace for no internet connection. My concern is this: if a user is disconnected and out of range of the internet for 15 days, they will eventually get a "Not genuine" response. Is that right? When they next connect to the internet, do they have to reactivate properly? And should I deactivate it at all?Neil
My concern is this: if a user is disconnected and out of range of the internet for 15 days, they will eventually get a "Not genuine" response. Is that right?
Only if it's been 60 days + 14 days since the last genuine check from the servers.
When they next connect to the internet, do they have to reactivate properly?
No, they (or you, through a button or something) call IsGenuine() so they can verify with the servers.
So how do you tell the difference between a user not being activated and a user that *is* activated but needs to reverify with the servers? Simple, if IsGenuineEx() returns NotGenuine, simply check IsActivated().
In other words IsActivated() will see if they are activated without verifying with the servers.
Does that make sense?