Issues with multiple product keys on same machine for one product

We've been using LimeLM for a while and it's been working great, however today we ran into an unusual use case and am not quite sure how best to work around this issue.

We have 1 product with multiple license fields. The license fields determines actions that a user can do. All our users typically use only one account (and thus product key) per machine.

However, our QA team are often switching between accounts in our software. Each account is associated with a product key. Our software is actually a suite of services, where we have main software (which has account info) invoking a child service (which doesn't have any account info).

Our current approach is as follows (pseudo-code):Main software (C#) calls:PDetsFromPath(...)bool genuine = IsGenuine(30, 7) // does an offline check if interneterrorif (genuine) return true;else{CheckAndSavePKey(productKey);Activate();}

It then invokes the child service (standalone). All the child service does is the following:PDetsFromPath(...)IsActivated(guid)GetFeatureValue(...)

Now, my confusion lies in how to handle the different product keys. I assume we should probably be calling CheckAndSavePKey(productKey) in the main software BEFORE we call IsGenuine? Would this then guarantee that the child service, when calling GetFeatureValue(...), would be calling it for the correct product key? Ideally, I'd like to avoid having to pass the product key to the child service if possible.

Just to clarify, all services are running on the same machine.

Well, first of all that code is not correct:

bool genuine = IsGenuine(30, 7) // does an offline check if interneterrorif (genuine) return true;else{CheckAndSavePKey(productKey);Activate();}

Please see our examples for the correct way to check if the activation is valid, and the correct way to handle invalid activations and activations that have not been verified in X days: https://wyday.com/limelm/help/using-turboactivate-with-csharp/

>> "Now, my confusion lies in how to handle the different product keys. I assume we should probably be calling CheckAndSavePKey(productKey) in the main software BEFORE we call IsGenuine?"

No, you should only ever call CheckAndSavePKey() once: when the customer is activating your software. See our examples and articles to see how to properly use TurboActivate.

>> "Ideally, I'd like to avoid having to pass the product key to the child service if possible."

You don't need to. Just activate once, then any process can see if the activation is valid provided they have access to the TurboActivate.dat file and the Version GUID.

I think there's a misunderstanding. We do it as per the implementation. The code provided was just pseudo code showing the steps that we take. It has been working in production across dozens of accounts with no issues for months now.

Again, the only scenario that is failing is where we switch between two product keys on the same machine. The example code provided, much like our code, does not seem to handle this case.

An example:Two accounts:user1 with pkey 1. pkey 1 has license fields A enabled. user2 with pkey 2. Pkey 2 has licence fields A and B enabled.

user1 logs in for first time, no activation on machine. user1 activates with pkey 1.user2 logs in for first time, user1 has already activated so when we call IsActivated, it returns true. Thus we never activate pkey 2 on that machine.

So, when user2 tries to use a feature in our software that is conditional on license field B it fails, as GetFeatureValue is looking at the wrong product key (pkey 1 instead of pkey 2).

If you want to do per-user-session licensing then you should use TurboFloat. See this article: https://wyday.com/limelm/help/licensing-types/

TurboActivate is designed for per-machine licensing. TurboFloat is designed for per-user session per-machine licensing (what you're trying to do).

Let me know if that makes sense.

Hi there,

we have a similar scenario: we need to license a product, but multiple independent instances of the same product (using different product keys) will exist on the same server. When we tried to call CheckAndSavePKey we got an error:wyDay.TurboActivate.AlreadyActivatedException : You can't use a product key because your app is already activated with a product key. To use a new product key, then first deactivate using either the Deactivate() or DeactivationRequestToFile().

So, the question is simple: can multiple product keys exist and be activated simultaneously on the same machine ?

Yes. For separate product version in LimeLM (separate version in LimeLM, separate TurboActivate.dat, separate Version GUID, separate product key).

Not for the same product version in LimeLM.

Or, if you want to use the same product version in LimeLM, use custom license fields: https://wyday.com/limelm/help/license-features/

That means we will need a separate version GUID for each installed instance, associated with only one product key. That effectively means the version GUID acts as a product key, and the product key is not of any real use. We won't be able to hard-code the version GUID in the product, we will need to make it dynamic instead, thus adding yet another value that users will need to supply upon license request.

We need a better idea of what you're trying to accomplish. If you're trying to license per user-session, there's actually a product for that: TurboFloat.

See: https://wyday.com/limelm/help/licensing-types/#floating

But a clearer idea of exactly what you're trying to accomplish is needed before we can help you effectively.

Multiple independent instances of the same product need to be installed on the same server, each with its own custom license fields (expiration date, for example). We are not licencing per-user. There is a limitation of the number of users, but that's a different thing. Per-user licensing is not suitable, because users may change, and we only need to limit the number of users, not the list of users. We need to be able to isolate different environments (instances) of the product, so they can be license independently (each environment is identified by a URL and may have its own custom license fields). We tried to activate a second product key on the same server, but we got an error (see one of the previous posts).