License detection of runtime vs. designtime

  • Thread starter Thread starter Mark Ramey
  • Start date Start date
M

Mark Ramey

I have an assembly that I want to license to developers.
I don't want to license the runtimes that they deliver to
their customers. There are no real design-time controls,
only some classes that they use by referencing the
assembly. If I implement the LicenseManager stuff the
LicenseContextMode of any objects is always 'Runtime'
which makes sense. How can I tell if the assembly is
being used for development and not in the resulting
product? Any ideas? Do I need to just rely on a paper
license?

Thanks!

Mark
 
Hi Mark,

Thanks for your post. Since you want to license to developers and don't
license the runtimes that they deliver to their customers, I believe that
you can use the "design time license".

As you know, licensing is desinged into runtim in the .NET Framework. The
piece that holds licensing together in .NET is the LicenseManager. The
LicenseManager is part of the runtime and whenever a class is instantiated,
the LicenseManager accesses the proper validation mechanism for the control
or component. Classes are marked as licensed by adorning the class with the
LicenseProviderAttribute. This attribute also specifies the type of
validation that occurs.

For the "design time license", a license provider need to find for a valid
license at design time. The license will be converted into a license key
and embedded into the executing assembly when building, so that it will run
properly on the client side. As you can see, an application using your
component cannot be built properly without the license.

For detailed information on .NET Licensing, I recommend you the following
articles:

.NET Licensing
http://windowsforms.net/articles/Licensing.aspx

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

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top