View previous topic :: View next topic |
Author |
Message |
Nhir
Joined: 11 Apr 2011 Posts: 4
|
Posted: Tue Apr 12, 2011 5:38 pm Post subject: Key productInfo validation before install |
|
|
I want 2 type of keys, one for upgrade and an other for "first install". I was thinking of putting that info in de productInfo with my expiry date.
On my activation form, in OnInstallButtonClick, i want to check the key for my tag BEFORE calling the InstallLicense function. Here is my code...
EncryptedLicenseProvider myEncryptedLicenseProvider = new EncryptedLicenseProvider();
EncryptedLicense myEncryptedLicense = myEncryptedLicenseProvider.ValidateLicenseKey(LICENCE_PARAM, authenticationKeyText.Text);
myEncryptedLicence is always NULL and i don't know why.
p.s. LICENCE_PARAM is my xml used for validation to the web service with the tag AuthenticatedLicenseParameters removed and everything after the tag /EncryptedLicenseParameters...is that correct? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Apr 12, 2011 10:39 pm Post subject: |
|
|
Do you mean that you want to check the ProductInfo before the license key is authenticated (ie before AuthenticatedLicenseForm.InstallLicense is called). This is only possible if you don't use an Authentication Password for the Product. When you specify an authentication password the license key is double encrypted and only the authentication server has the password that can unencrypt it (ie the application can't).
If you remove the authentication password for your product (and update the LICENSE_PARAMETERS and AuthenticationServerSettings.xml) then the code you wrote should work. This does reduce your security a little and also means that the key stored in the license file is not encrypted - ie it is the same key that you enter to install the license. _________________ Infralution Support |
|
Back to top |
|
|
Nhir
Joined: 11 Apr 2011 Posts: 4
|
Posted: Tue Apr 12, 2011 11:25 pm Post subject: |
|
|
yes it is exactly what i want to do.
If somebody get a key at a lower price ( like a renewing key), i don't want that this key can be used in a new installation of the product.
To avoid activaction on that key ( and binding to the machine), i just wanted to do the check before (installation / activation).
To bad for the customer, i will just have to uninstall the licence if that case append and it will not be usable on another machine.
Thanks |
|
Back to top |
|
|
|