Control Licensing

M

Mauro

Help please!

I'm trying to implement control licensing using the LicFileLicenseProvider
implementation of the LicenseProvider class, but I cannot seem to get the
right format either in my <controlname>.LIC file, or in the first line
"myClass name is a licensed component" in the file. (I will implement my own
validation once I get the basic structure working.)

All I can find in the literature is a reference to using the fully qualified
name of the control, and the fully qualified name of the component.

My control is called ctlAlarmClock and it's contained in a component class
called ctlClockLib. So I would have thought that

filename = ctlClockLib.ctlAlarmClock.LIC

text = "ctlClockLib is a licensed component"

should both work.

Any help would be greatly appreciated.

Mauro
 
D

Dion Heskett

try is:

Filename: ctlClockLib.ctlAlarmClock.LIC
text: ctlClockLib.ctlAlarmClock is a licensed component

what attributes do you have on you class ?

[
System.ComponentModel.LicenseProvider(typeof(System.ComponentModel.LicFilePr
ovider)),
]
public class ctlAlarmClock : Control
{
private License lic;

//check license
lic = LicenseManger.Validate(typeof(ctlClockLib.ctlAlarmClock),this);
}

you will also need to dispose of the license

protected override void Dispose (bool disposing)
{
if ( lic !=null )
{
lic.dispose();
}
base.Dispose( disposing )
}


also checkout LicenseManger.validate

hope this helps

Dion Heskett
www.viascape.com
 
M

Mauro Ciaccio

Thanks for the suggestions. I will check your code against what I've
done.

Mauro
 

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