View previous topic :: View next topic |
Author |
Message |
Fishtail
Joined: 29 Sep 2011 Posts: 8
|
Posted: Mon Jan 09, 2012 5:22 pm Post subject: Get product info and serial number without authentication? |
|
|
We have ILS 4.7.2 and created an intranet site for tracking installations of our product. We'd like to retrieve the serial number and product info string from ILS given a license key (without querying the ILS database directly). We wrote a web service that calls AuthenticatedLicenseProvider.AuthenticateKey, and sends back the data we're interested in.
Our approach seemed to work fine at first when only the development machine was getting the serial number and product info. When we moved the site into production, we get an exception whenever any machine other than the development machine tries pulling up the page:
The number of installations allowed for this license key has been exceeded.
MaxAuthentications in the LicenseKey table is -1, but it's also set to 2 in AuthenticationServerSettings.xml, so clearly we're not doing something right. Is it possible to do what we want?
Thanks |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Jan 09, 2012 9:16 pm Post subject: |
|
|
If your program calls AuthenticatedLicenseProvider.AuthenticateKey then it is going to use one of the allowed authentications for the product.
A MaxAuthentications value of -1 for a license key means "use the default for the product" which in your case is 2. So this means that if you receive the "number of installations allowed" message then you have already installed the key on 2 machines.
I would suggest that you consider upgrading to Version 5 of ILS. It includes a new AuthenticatedLicenseProvider.GetProductInfo method that allows you to get the ProductInfo for an authenticated license key without using up an authentication. _________________ Infralution Support |
|
Back to top |
|
|
Fishtail
Joined: 29 Sep 2011 Posts: 8
|
Posted: Mon Jan 09, 2012 9:52 pm Post subject: |
|
|
Thanks for the clarification.
In Version 5, is there a way to get the serial number (in addition to the product info) without using up an authentication as well? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jan 10, 2012 7:57 am Post subject: |
|
|
No there currently isn't a method that gets the Serial No. We could potentially add a method to retrieve the encrypted license - which would allow you to get the serial no and the ProductInfo in one go.
However I'm not sure I understand why you need to do this. What exactly is your intranet site doing? How does it get the license key in the first place if it isn't accessing the database? _________________ Infralution Support |
|
Back to top |
|
|
Fishtail
Joined: 29 Sep 2011 Posts: 8
|
Posted: Tue Jan 10, 2012 2:01 pm Post subject: |
|
|
Our intranet site is a manufacturing and installation record for all our products, one of which uses ILS. When the software is sold, sales generates a license key with ILS and emails it to the customer. Our intent was that the salesperson then goes to the site and pastes the key in; the backend does the lookup from ILS for the serial number and product info.
Quote: | How does it get the license key in the first place if it isn't accessing the database? |
I answer this above, but it's worth pointing out that we could probably do what we're looking to do by bypassing the ILS API altogether and querying your database directly. However this seems like a bad idea in case breaking changes are introduced in a future version. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jan 10, 2012 11:58 pm Post subject: |
|
|
OK - thanks I understand. The database schema is pretty stable - particularly the LicenseKey table that contains the data you want. The names of the particular table and columns you would need to access haven't changed in the last 5 years - so you could probably access these directly without too much risk.
Another alternative would be for your intranet application to call the AuthenticatedLicenseProvider.DecryptAuthenticationKey method. This returns the EncryptedLicense which has the serial number and ProductInfo. This is the method that the AuthenticationServer calls. This method requires the full AuthenticatedLicenseParameters for the product (including private keys and password) - the same as if you were generating keys programmatically. See the following FAQ that discusses this:
http://www.infralution.com/phpBB2/viewtopic.php?t=1706 _________________ Infralution Support |
|
Back to top |
|
|
Fishtail
Joined: 29 Sep 2011 Posts: 8
|
Posted: Wed Jan 11, 2012 10:50 pm Post subject: |
|
|
Quote: | Another alternative would be for your intranet application to call the AuthenticatedLicenseProvider.DecryptAuthenticationKey method. |
Thanks, this seems to work perfectly and was easy to rewrite. |
|
Back to top |
|
|
|