View previous topic :: View next topic |
Author |
Message |
dib.ashish
Joined: 23 Jun 2014 Posts: 6
|
Posted: Mon Jun 23, 2014 9:53 am Post subject: API to generate license key |
|
|
Hi, Is there any api to generate license key in order to send the license key to client? or alternate way to complete this task? Thanks in advanced..! |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
|
Back to top |
|
|
dib.ashish
Joined: 23 Jun 2014 Posts: 6
|
Posted: Fri Jun 27, 2014 8:50 am Post subject: Adding reference |
|
|
How can i add reference of
Infralution.Licensing.Data
Infralution.Licensing.ASP or Infralution.Licensing.Forms
Is there any sample in c#? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Jun 27, 2014 8:54 am Post subject: |
|
|
Yes the Command Line Key Generator sample project (at the bottom of the Start page in License Tracker) demonstrates using this API. It reads some data from an XML file and then creates customer, sale and license keys. _________________ Infralution Support |
|
Back to top |
|
|
dib.ashish
Joined: 23 Jun 2014 Posts: 6
|
Posted: Mon Jun 30, 2014 6:37 am Post subject: |
|
|
Can you please give me link here? I do not find any sample project on main page. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Jun 30, 2014 8:51 am Post subject: |
|
|
What version of ILS are you using (see the Help > About menu in License Tracker). Have you got the Options > Show Start Page option enabled? If so there should be a Start tab in License Tracker. Select this and scroll down the page. The Command Line Key Generator is the last sample project. Alternatively you can access the sample projects under:
Code: |
C:\Program Files (x86)\Infralution\Licensing System 5\Samples\VS2005\C#\CmdLineKeyGenerator
C:\Program Files (x86)\Infralution\Licensing System 5\Samples\VS2008\C#\CmdLineKeyGenerator
C:\Program Files (x86)\Infralution\Licensing System 5\Samples\VS2010-2012-2013\C#\CmdLineKeyGenerator
|
Depending on your version of Visual Studio _________________ Infralution Support |
|
Back to top |
|
|
dib.ashish
Joined: 23 Jun 2014 Posts: 6
|
Posted: Tue Jul 01, 2014 6:18 am Post subject: |
|
|
Currently i am able to generate the key but when inserted into the product it is saying that it is not valid key for the product. I think, i am missing the last step.
Quote: | Note that this method does not insert the license keys into the License Tracker database. If you want to manage the license keys in License Tracker (which your probably will need to if you are using Authenticated Licenses) then you will need to import the license key and sale information using the License Tracker LicenseKey or Sales import mechanism. |
I did not get the last step. How can i insert license key in license tracker database in order to authenticate? As License key is being generated through code, we need to insert key in license tracker database through the code and not through UI(import sales). |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jul 01, 2014 11:43 pm Post subject: |
|
|
How are you generating the key? Are you using the Infralution.Licensing.Data API as shown in the Command Line Key Generator sample project? This adds the key to the database as well as generating it.
Are you getting the error trying to authenticate the generated key with your application? _________________ Infralution Support |
|
Back to top |
|
|
dib.ashish
Joined: 23 Jun 2014 Posts: 6
|
Posted: Wed Jul 02, 2014 12:15 pm Post subject: |
|
|
Hi i have tried using both the methods you mentioned.
I am succeeded with method 1(included source code in project(asp.net)) on local system. but when i am trying to publish it, publish gets failed.
following are the errors which are i am facing:
Quote: | Database.cs: Cannot implicitly convert type 'System.Security.Cryptography.RSACryptoServiceProvider' to 'Infralution.Licensing.ASP.RSACryptoServiceProvider' |
Quote: | Database.cs(213,42,213,9: error CS1502: The best overloaded method match for 'Infralution.Licensing.LicenseUtilities.WriteConfigurationKey(System.Security.Cryptography.RSACryptoServiceProvider, bool)' has some invalid arguments |
Quote: | Database.cs(213,81,213,91): error CS1503: Argument 1: cannot convert from 'Infralution.Licensing.ASP.RSACryptoServiceProvider' to 'System.Security.Cryptography.RSACryptoServiceProvider' |
Quote: | Database.cs(224,20,224,77): error CS1502: The best overloaded method match for 'Infralution.Licensing.LicenseUtilities.WriteConfigurationKey(System.Security.Cryptography.RSACryptoServiceProvider, bool)' has some invalid arguments |
Quote: | Database.cs(224,59,224,69): error CS1503: Argument 1: cannot convert from 'Infralution.Licensing.ASP.RSACryptoServiceProvider' to 'System.Security.Cryptography.RSACryptoServiceProvider' |
Quote: | RSACryptoServiceProvider.cs(129,17,129,80): error CS1502: The best overloaded method match for 'Infralution.Licensing.LicenseUtilities.ReadRSAParameters(System.Security.Cryptography.RSACryptoServiceProvider, System.Xml.XmlReader, string)' has some invalid arguments |
Run correctly on local system but getting error while publishing. How to overcome this errors? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jul 02, 2014 11:17 pm Post subject: |
|
|
What exactly are you doing when you get these errors? Are you using the Build > Publish menu in Visual Studio?
The errors seem to indicate that you are not uploading the required assemblies to the server. In particular your server bin directory needs to have Infralution.Licensing.ASP.dll and Infralution.Licensing.Data.dll. _________________ Infralution Support |
|
Back to top |
|
|
|