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 

API to generate license key

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



Joined: 23 Jun 2014
Posts: 6

PostPosted: Mon Jun 23, 2014 9:53 am    Post subject: API to generate license key Reply with quote

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..! Smile
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Jun 23, 2014 11:06 pm    Post subject: Reply with quote

See the following FAQ:

http://www.infralution.com/phpBB2/viewtopic.php?t=1706
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
dib.ashish



Joined: 23 Jun 2014
Posts: 6

PostPosted: Fri Jun 27, 2014 8:50 am    Post subject: Adding reference Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Jun 27, 2014 8:54 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dib.ashish



Joined: 23 Jun 2014
Posts: 6

PostPosted: Mon Jun 30, 2014 6:37 am    Post subject: Reply with quote

Can you please give me link here? I do not find any sample project on main page.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Jun 30, 2014 8:51 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dib.ashish



Joined: 23 Jun 2014
Posts: 6

PostPosted: Tue Jul 01, 2014 6:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Jul 01, 2014 11:43 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dib.ashish



Joined: 23 Jun 2014
Posts: 6

PostPosted: Wed Jul 02, 2014 12:15 pm    Post subject: Reply with quote

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,9Cool: 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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Jul 02, 2014 11:17 pm    Post subject: Reply with quote

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
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