Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Invalid data when installing a signed license

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
geodesoftware



Joined: 28 Aug 2009
Posts: 5

PostPosted: Fri Nov 13, 2009 8:59 pm    Post subject: Invalid data when installing a signed license Reply with quote

We are trying to create a custom validator for licenses. The process appears to work, but we get an "invalid data" message when trying to install the signed license. Any help would be greatly apprecaited. Code follows:

Dim provider As New AuthenticatedLicenseProvider
Dim licpara As New AuthenticatedLicenseParameters
licpara.ReadFromString(LICENSE_PARAMETERS)
licpara.ProductPassword = "PASSWORD"
licpara.AuthenticationPassword = "AUTHPASSWORD"
Dim oAuth As AuthenticatedLicense
Dim sLicensePath As String = "C:\License Files\"

Dim oLic As AuthenticatedLicense

oLic = provider.ReadLicense(sLicensePath & "License.lic")


oAuth = provider.SignLicense(licpara, oLic.LicenseKey, oLic.ComputerID)

provider.WriteLicense(sLicensePath & "v_License.lic", oAuth)
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Nov 13, 2009 11:52 pm    Post subject: Reply with quote

I think the problem is that you are using the same LICENSE_PARAMETERS that you include in your application for validating the license. These parameters do not include the private keys necessary for generating and authenticating licenses.

To get the parameters required for authenticating a license you need to export the settings to an Infralution License Settings (.ils) file from LicenseKeyGenerator or LicenseTracker. This will include the private keys required. Then you can read this in your application:

Code:
Dim paramers as new AuthenticatedLicenseParameters
Using reader As New XmlTextReader(fileName)
    parameters = parameters.Read(reader)
End Using


Alternatively you can copy the contents of the .ils file to a string in your code and use the ReadFromString method to initialize the parameters as your code did.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
geodesoftware



Joined: 28 Aug 2009
Posts: 5

PostPosted: Tue Nov 17, 2009 8:02 pm    Post subject: Reply with quote

I no longer have the license tracker DB, just the authentication server. Is there a way to export the correct key from the authentication server?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Nov 17, 2009 9:27 pm    Post subject: Reply with quote

geodesoftware wrote:
I no longer have the license tracker DB, just the authentication server.

How are you going to generate license keys then?

Quote:
Is there a way to export the correct key from the authentication server?

Yes you can copy the required settings from the AuthenticationServerSettings.xml file. You want to copy the whole "AuthenticationLicenseParameters" XML element.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
geodesoftware



Joined: 28 Aug 2009
Posts: 5

PostPosted: Mon Nov 30, 2009 6:49 pm    Post subject: Reply with quote

We are generating keys by using the autentication service. We have all of the authentication service settings and service db, we just don't have license tracker.

So we just read AuthenticationLicenseParameters section from the autehticationsettings file into AuthenticatedLicenseParameters which we can then use to call the signlicense method?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Nov 30, 2009 9:23 pm    Post subject: Reply with quote

Quote:
We are generating keys by using the autentication service. We have all of the authentication service settings and service db, we just don't have license tracker.


The authentication service (unless you have modified it) doesn't generate keys - it just authenticates them and signs the license file. The AuthenticationSettings file doesn't contain the product password required to generate new keys.

Quote:
So we just read AuthenticationLicenseParameters section from the autehticationsettings file into AuthenticatedLicenseParameters which we can then use to call the signlicense method?


You can use these license parameters to sign files.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group