Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

How to configure control licensing

Total Hit ( 2953)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


The .NET Framework has a licensing model identical for all types of components and
controls that is fully compatible with the licensing rules used for ActiveX controls.
Developing and Implementing Windows-Based Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET
Licensing allows authors to protect intellectual property by checking, at design time, that
the control is used legally. If this happens, the application gets a run-time license that can
be freely distributed.
There are many licensing models, but the simplest requires a set of steps:

1. Include the System.ComponentModel namespace
2. Apply a LicenseProviderAttribute to the class that implements the control
3. Declare a License object
4. Call the Validate or IsValid methods of the LicenseManager in the constructor of
the control to fill the License object with a valid license
5. Call Dispose on any granted license in the finalizer of the class or before the
finalizer is called
6. Create a text .LIC file (with the correct information) and save it to the assembly
folder

Here is an example:

Click here to copy the following block
Imports System
Imports System.ComponentModel
Imports System.Web.UI
<LicenseProvider(GetType(LicFileLicenseProvider))> _
Public Class MyControl
Inherits Control
Private license As License
Public Sub New()
license = LicenseManager.Validate(GetType(MyControl), Me)
End Sub
Public Overloads Overrides Sub Dispose()
If Not (license Is Nothing) Then
license.Dispose()
license = Nothing
End If
End Sub
End Class


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.