Looking for a better licensing technology

S

Stephen Walch

We have a .NET class library with a built-in license-control system that
checks for the presence of a digitally signed license file AT RUNTIME. This
is a fairly standard technique that distinguishes between "trial" licenses
(which only allows only limited functionality) and "full" licenses.

We have not, however, figured out an effective way to apply licensing
techniques AT DESIGN TIME. I have evaluated a few different licensing
technologies and products and I have not figured out a way to achieve any
control, record or react to what kind of license is present when code that
is referencing our class licrary is bein compiled.

I have explored the facilities for licensing in System.ComponentModel and
(as far as I can tell) that only impacts what happens when a "component" is
being visually manipulated by designer tools such as a Visual Studio forms
designer. It does not seem to prevent anyone from compiling code that
simply instantiates my classes and calls my methods, not does it record any
licensing information when such code is being compiled.

At a high level, what I want to achieve is that developers can use a trial
license of my class library to compile and execute their own test programs,
but they should not be able to "go live" until developers have obtained a
"full" license, recompiled the app, and deployed to a machine that has a
"full" license.
 
C

Christian Benien

Have you looked at the license compiler lc.exe? You still check
licenses at runtime, but you have to embed them into the assembly at
design-time.

You can, for example, display a "This is a Trial version" form at
runtime if you don't find a valid embedded license.
 
S

Stephen Walch

Interesting. Is there a way to make sure that this happens everytime an
application that references my assembly is compiled?
 
P

Peter Huang [MSFT]

Hi

I think the license check occurred at the designtime or runtime when the
code is executed but not the compiling time.

Here are some links for your reference.
Licensing Your Components
Creating Designable Components for Microsoft Visual Studio .NET Designers
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
ml/pdc_vsdescmp.asp

Licensing Components and Controls
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconlicensingcomponentscontrols.asp

LicensedControl Sample
..NET Samples - Windows Forms: Control Authoring
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpqstart/ht
ml/cpsmpNETSamples-WindowsFormsControlAuthoring.asp

Licensed Applications using the .NET Framework
http://www.codeguru.com/columns/Experts/article.php/c5469/

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top