Licensing in .NET
By Myk Willis, October 01, 2003
The Microsoft.NET licensing model works well for the kind of redistributable components that developers buy and redistribute as a part of an application. In this article, we'll enable licensing support for a simple redistributable component, and see how Visual Studio .NET automates much of the licensing process for components.
Licensing in .NET
Listing 1 A simple licensed component
using System;
using System.ComponentModel;
using System.Windows.Forms;
[LicenseProvider(typeof(LicFileLicenseProvider))]
public class SimpleLicensedComponent : Component
{
public SimpleLicensedComponent()
{
LicenseManager.Validate( typeof(SimpleLicensedComponent) );
}
}