Cannot submit a Valid Key
Please note: I am using QLM 5
I have created my own new Product from the QLM Console and copied the generated code to my application. Everything compiles correctly - no errors or warnings.
However, my application consistently returns value '4' from license.GetStatus() (i.e. 'invalid key').
In an attempt to troubleshoot the issue, I modified the QLM example project by changing the parameters of DefineProduct() to suit my Product and not the Demo Product. When I tested by submitting the same generated key, license.GetStatus() returned value '8' (i.e. 'valid key').
So, having proven that my Product and the generated key were indeed valid I then copied the QLM example forms (QlmLicenseFrm.cs and YourAppFrm.cs) and the LicenseValidator.cs C# library from the example project to my own project (same workstation; same Visual Studio version; no code changes). However, this time when the same key is submitted to QlmLicenseFrm.cs (note this form is inside my project at this time) I receive value 4 from license.GetStatus() (i.e. 'Invalid Key').
I have used the debugger to step through each line of code in my Project and the QLM Example Project, side-by-side, to check for errors. This has confirmed that each line of code is executed consistently between the two Projects - only that the QLM example project succeeds with value 8 (valid key) and my project fails with value 4 (invalid key).
So, is there some file or reference to the Private Key that the example application is using that my project isn't? Or is there any other reference that my project could be missing or something that I haven't configured properly?
I'm out of ideas??
Your assistance is greatly appreciated.
-
Hi Damien
Before calling ValidateLicenseEx (which I assume is the call that is failing), please verify the following:
1. That the license key passed to ValidateLicenseEx is the one you think it is. Sometimes, QLM may find a key on the system and pick it up so it might be validating a different key than the one you think it's validating.
2. With Visual Studio, while debugging, do a Quick Watch on the QLmLicense object and confirm that the following properties are what you expect them to be:
- Product ID
- MajorVersion
- Minor Version
- GUID
- PublicKey
- CommunicationEncryptionKey
Regards
John
Please sign in to leave a comment.
Comments
1 comment