This section provides an overview of the concept of licensing as it applies to software purchasing and pricing. It discusses some common types of licensing as well as some guidelines on when to use licensing mechanisms and when they aren't appropriate.
Licensing is the means by which valid users of your software distinguish themselves from users who do not have permission (license) to use your software. Whether you are writing GUI controls, an API of classes, or a fully functional application, you need some way to identify those who have the right to use your software and those who don't. A section coming up shortly provides a list of the various ways of identifying a user's right to use the application.
When to License and Protect
When you see licensing mentioned in the context of the .NET Framework, it is almost always referring to the licensing of controls and classes, and not to application purchase plans. If you have created a control that requires some kind of action on the part of the user before he can use it, licensing is definitely something you should consider. However, if you have created an application that will require a CD key in order to install, that technology is covered elsewhere. For that type of scenario, you might want to see whether encryption technologies would be useful.
As far as protection is concerned, all .NET developers should be aware of the fact that every managed application can be disassembled into its corresponding MSIL (Microsoft Intermediate Language). If some aspect of the logic and code in your application is too sensitive to allow curious users of your application to see, you should consider protecting your intellectual property. You'll learn how to accomplish that near the end of this chapter.
Types of Licensing and Verification
There are countless ways in which you can license your applications, classes, and controls. As new delivery mechanisms are created and Internet access becomes more ubiquitous, more licensing schemes are being created every day. The following list describes just a few of the software licensing schemes that can be facilitated by the .NET Framework:
Fortunately for product developers, the .NET Framework's built-in licensing scheme enables you to implement all the preceding models and many others. The number of licensing models available to you is limited only by your ability to design and come up with new models.