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 

Development key and GoLive key on one Control

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



Joined: 07 Jan 2009
Posts: 2

PostPosted: Wed Jan 07, 2009 2:57 pm    Post subject: Development key and GoLive key on one Control Reply with quote

Hi,

I bought one license and get the source code, it’s great, seems easy to use and the code is clean. Here is my scenario and I am wonder if it can be implemented by your product.

Let’s say my product is a desktop control called myProduct.dll. Here is what I want
A, user gets the control for free, it can be used in design time for 30 days, but cannot work in runtime.
B, after input the Development key, 30 days limitation has been eliminated on that machine ONLY, but the assembly still cannot work in runtime.
C, after input the GoLive key, the assembly can work in runtime on any machine.

I think your product can help me accomplish this, here are 3 questions:

A, I read some of your sample and found licensed key is sometimes stored in a licx file, sometimes stores in the assembly itself. So for my scenario can I do it in this way: when people input the development key, I write the encrypted key number to registry so it will find the key in design time and will not check the expiration. When people input the GoLive key, I embed the key to the assembly itself so it gets the key in runtime and passes the checking. How to implement it with Infralution Licensing System? How do you think this approach and are there some better ways?

B, people will create b.dll reference myProduct.dll and create a.exe referencing b.dll. If myProduct.dll is for design time only, does that confirm b.dll is also for design time only?

C, if myProduct.dll is not a desktop control, if it’s a web control, is there something different? What about a component? And what about a WPF control? I think at least for other projects, there will not have a messagebox prompted as they do not have the System.Windows.Form referenced. Also I noticed for the “licensed control” sample, if I change the control to a component, a licx file will be generated including the licensed key under debug folder, while if it’s a control, it generates automatically in the project with only assembly’s strong name. just wonder is there any other big differences?

Sorry to ask so many questions in my first message. You know the licensing part is always very sensitive and many things I want to make sure. I got your source code, but that takes time to read, hope you can give me some tricks for quickly getting in.

You help will be greatly appreciated, thanks in advance.

Ben
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Jan 07, 2009 10:28 pm    Post subject: Reply with quote

Steps A and B of your scenario are easy since they are the standard licensing scenario. The Licensed Control sample project shows how to implement these.

Separating the GoLive from the Development license in Step C is more of a challenge. Presumably you would still like someone with a developer license to be able to run the executable on their own machine - you just don't want them to be able to distribute the licensed application to other machines. Probably the best way to achieve this would be to make a small modification to the following method in the EncryptedLicenseProvider source code.

Code:
protected virtual EncryptedLicense ValidateLicenseKey(string licenseKey, LicenseUsageMode usageMode, bool generateRuntimeLicenseKey, ref string runtimeLicenseKey)


This contains a code block at the bottom that generates the runtime key to embed in the assembly from the design time key. You would change this to also check if the ProductInfo is "L" (indicating a go live license) ie

Code:
if (usageMode == LicenseUsageMode.Designtime &&
generateRuntimeLicenseKey && productInfo == "L")
{
...
}


This will mean that runtime license key will only be included in the assembly resources if they have "Go Live" license. When you generate a "GoLive" license you set the ProductInfo to "L". The executable will still run however if they have a valid license file.

If you are using simple EncryptedLicensing there is a small possibility that a developer could circumvent your golive licensing by distributing their development license file. If you want to avoid this you should use Authenticated Licensing - this locks the development license file to their machine.

Quote:
people will create b.dll reference myProduct.dll and create a.exe referencing b.dll. If myProduct.dll is for design time only, does that confirm b.dll is also for design time only?


By default the .NET license manager only checks for license keys in the entry (ie exe) assembly. This means that if some embeds your control in another your control will still require a license in the entry executable - ie this doesn't allow them to circumvent your license.

Quote:
if myProduct.dll is not a desktop control, if it’s a web control, is there something different? What about a component? And what about a WPF control? I think at least for other projects, there will not have a messagebox prompted as they do not have the System.Windows.Form referenced. Also I noticed for the “licensed control” sample, if I change the control to a component, a licx file will be generated including the licensed key under debug folder, while if it’s a control, it generates automatically in the project with only assembly’s strong name. just wonder is there any other big differences?


.NET licensing framework does not support embedding runtime license keys in the resources for ASP.NET applications so the approach for web controls would have to be somewhat different. See the following post:

http://www.infralution.com/phpBB2/viewtopic.php?t=1088

PS if you need to discuss the source code changes in any more detail it will probably be better to do that via email to support@infralution.com as we prefer not to post source code to the forums.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
ByminBen



Joined: 07 Jan 2009
Posts: 2

PostPosted: Thu Jan 08, 2009 3:00 pm    Post subject: Reply with quote

Thanks very much for the informative reply. I have 2 more questions which I think are very important for the component licencing. As with attachments, I will send you by mail. Just express my gratitude for your help here.

Ben
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Feature Requests 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