View previous topic :: View next topic |
Author |
Message |
frankcrowder
Joined: 04 Dec 2008 Posts: 7
|
Posted: Sun Dec 12, 2010 5:10 pm Post subject: Get Serial from Key |
|
|
I use AuthenticatedLicense on my product and created a program to return the serial number of a key and this works but, it adds one Authentication to the server for that key and My computer.
so, can I get the serial number from an Authenticated License Key without updating the server? |
|
Back to top |
|
|
frankcrowder
Joined: 04 Dec 2008 Posts: 7
|
Posted: Sun Dec 12, 2010 6:15 pm Post subject: fixed |
|
|
AuthenticatedLicenseProvider provider = new AuthenticatedLicenseProvider();
string key;
key = textBox1.Text; //License Key sent to customer for this product
AuthenticatedLicenseParameters lp = new AuthenticatedLicenseParameters();
lp.ReadFromString(LP); //LP = the LicenseParameters for this product
lp.ProductPassword = "yourproductpassword";
lp.AuthenticationPassword = "yourauthpassword";
EncryptedLicense authLicense = provider.DecryptAuthenticationKey(lp, key);
if (authLicense != null)
{
label1.Text = authLicense.SerialNo.ToString();
label3.Text = authLicense.ProductInfo;
label2.Text = authLicense.LicenseKey;
} |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Dec 12, 2010 10:33 pm Post subject: |
|
|
What you've posted should be fine if you want to extract the serial number for use within your own license tracking applications. Obviously however this code should not be included in any client side application code - since it includes the passwords required to generate keys. _________________ Infralution Support |
|
Back to top |
|
|
|