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 

Licensing a Class Library

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



Joined: 02 Jun 2006
Posts: 3
Location: Ahmedabad

PostPosted: Fri Jun 02, 2006 10:35 am    Post subject: Licensing a Class Library Reply with quote

I have a class library in .NET. i want to include licensing. When the class library is shipped to the user (developer), he should first enter the license key and then he should be able to access the classes and its access modifiers. for a control its possible.. but for a class library... i cant get a solution to it.

i want to check at design time and not runtime... coz the end user should not be prompted to enter the license. is there any method to access the compiler and check whether the license key is installed on the machine or not so that when the developer tries to build his application using our dll, he would get a message prompt to enter the license key.

What i did until now is wrote a code for Licensing in the constructor of one of the classes in my class library. but that wouldnt help when the end user uses the application. Apart from the Developer, the end user would end up entering the license.

Please let me know about the solution to it.

Thanks

Usman Suglatwala.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Jun 02, 2006 11:42 am    Post subject: Reply with quote

You should check for a license in the constructor of the class and display the licensing install form then. This provides a mechanism for the developer to install the license key. If the developer adds an entry to their license.licx file for your class then the Visual Studio license compiler will create an instance of your class and the EncryptedLicenseProvider will automatically create and store a runtime license in the resources for the application. When the application is run by the end the EncryptedLicenseProvider retrieves this key from the application resources and so the end user doesn't have to enter a key.

See the online help on licensing controls and components and the following FAQ for more info:

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



Joined: 02 Jun 2006
Posts: 3
Location: Ahmedabad

PostPosted: Fri Jun 02, 2006 1:54 pm    Post subject: Licensing a Class Library Reply with quote

Infralution wrote:
If the developer adds an entry to their license.licx file for your class then the Visual Studio license compiler will create an instance of your class and the EncryptedLicenseProvider will automatically create and store a runtime license in the resources for the application.



Thanks for your prompt reply. But i still have some confusion. Where will be the licenses.licx file created? I dont see any licenses.licx file being created in my project folder, which, in the case of Controls, get created. So you mean to say that developer has to manually create the licenses.licx file and then mention the class as it is mentioned for a control.

Thanks.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
maniac



Joined: 02 Jun 2006
Posts: 3
Location: Ahmedabad

PostPosted: Fri Jun 02, 2006 2:36 pm    Post subject: Licensing a Class Library Reply with quote

Hello,

I just added a Licenses.licx file in 'My Project' folder of My Root directory and included it into my Project.

and included the following Code:

Code:
ClsLibforLicenseCheck.ClsCheckLicense, ClsLibforLicenseCheck


"ClsCheckLicense" is my Class where i have defined Licensing on the new constructor and "ClsLibforLicenseCheck" is my Class Library dll

I did not include the version information, neither the public key token. I get the following error on compilation.

Code:
Unable to resolve type 'ClsLibforLicenseCheck.ClsCheckLicense, ClsLibforLicenseCheck'


Please guide me to a solution. Thanks.

[/quote]
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Jun 02, 2006 10:35 pm    Post subject: Reply with quote

Make sure that the Build Action for the licenses.licx file is "EmbeddedResouce" and that your application project contains a reference to the Class Library 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