473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

licensing component - designtime

Hi,

I've developed a class that derives from component (rather than a
control), and am trying to license it at design time. I've set the
license attributes etc. to my custom license provider:

[LicenseProvider(typeof(SM_LicenseProvider))]

The problem is that my license provider never gets called at
designtime. To prove this, I've put this code into the implementation
of SM_LicenseProvder:

public override License GetLicense(LicenseContext context,
Type type, object instance, bool allowExceptions)
{
FileStream fs = new FileStream("d:\\lic.log",
System.IO.FileMode.Append, System.IO.FileAccess.Write);
string towrite = "";
if (context == null)
{
towrite = "context is null";
}
else
{
towrite = context.UsageMode.ToString();
}
byte[] b = System.Text.Encoding.ASCII.GetBytes(towrite);
fs.Write(b, 0, b.Length);
fs.Close();

It gets called at RunTime no problem, but never DesignTime. I tried a
simple class that derives from TextBox and uses the same license
provider and sure enough it does get hit at design time. This leads me
to think that designtime licensing only works for 'Controls'.

So how do you license a component at design time? Am I missing
something?

Stew
Nov 16 '05 #1
0 1246

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mohammad-Reza | last post by:
Hi I try to find a way to secure my components to send them to others. I'm want to find a way better than the way that microsoft provides with its LicenseProvider class. I think to use and...
1
by: Joël | last post by:
Hi ! I want to create a licensed component. I use the LicFileLicenseProvider class as parameter of the LicenseProvider attribute. Finaly I use the LicenseManager into my component as describe...
1
by: S.K. Dutta | last post by:
Hi! We have a .Net based product where we have implented a user based licensing using encryption, strong key and com components (we wrote it in C++ to avoid the license code being visible). ...
11
by: ML | last post by:
Does anyone have any info on sample code for handling activation/licensing for a vb.net app? Just looking for something fairly basic to implement the ability to have an application registered and...
9
by: vbdotnetmania | last post by:
Hi, I have looked through similar posts and have found Ken Tucker giving the reply about looking at article http://windowsforms.net/articles/Licensing.aspx This appears to be for controls and...
7
by: Andrew Smith | last post by:
Hi, does anybody know a good jumpstart for techniques to protect software with license keys? Thanks in advance Andrew -- Andrew Smith
3
by: james henderson | last post by:
I have a form on which I drag a self made component, it appears under the separater below the form. When I call me.Container or me.Site in the component they return nothing, how can I get access...
2
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just...
2
by: Martin Arvidsson | last post by:
Hi! I have developed a component that creates a lookup for selecting values. At designtime i want to display the windows as well but with certain criterias. is there a property or something to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.