DeployLX Software Protection System

Network Licensing Process and Componnets

Network Licensing lets multiple users share protected software across multiple machines.

Components

Network License Service

Runs as a Windows Tray Application or as a Windows Service. The Network License Service authorizes network clients to use the protected software. The service maintains a count of network clients and limits the total number of activate clients specified by the developer. The service also keeps track of licenses that have been checked out for disconnected use.

Network Client

The protected software uses the network client services to connect to and request authorization from the network license service. Once authorized the client regularly connects to the network license service to reaffirm use of the license.

Network Authority

Defines the rights to install and run a network license service and establishes the allowed number of network clients.

Network License Admin

Visualizes the active licenses on the network and controls the network license service.

Network License Certificate

Secures communications between the network license service and it's connected clients. Similar to SSL certificates used to secure Internet transactions.

Network Client Validation

Software protected by DeployLX network licensing system can be shared by multiple users on a network. During validation DeployLX communicates with a central network license service to request license authorization.

Connecting

When a client application tries to use a network license, DeployLX connects to a central network license service for authorization.

DeployLX enumerates the list of computers available on the network looking for a network license services listening on the TCP/IP port defined in the client limit. If a license service cannot be found automatically, either due to firewall, proxy or other intermittent issues the user will be asked for the location of the network service.

Once a network service has been located DeployLX will always try to connect to that server the next time the license is validated.

Authorization

Once connected to the network license service, DeployLX requests permission to use the protected software on the machine. If the total number of active clients is less than the number allowed by the license then validation will succeed. When the total number of allowed licenses has been reached the user must wait for another user to finish.

License Checkout

If a user needs to use the protected software while disconnected they can check out a license. The license will remain valid for the duration of the checkout period. When a license is checked out, no other users can use the license until it is checked back in.

To check a license in or out

  1. Get a reference to the NetworkLicenseClientLimit protecting the software.
  2. Get a reference to the NetworkLicenseClientMonitor.
  3. Call Checkout or Checkin on the monitor.
Dim client = TryCast(license.Limits(GetType(NetworkLicenseClientLimit)), NetworkLicenseClientLimit)
Dim monitor = client.GetMonitor(Nothing)
monitor.Checkout(DateTime.Now.AddDays(5), "Off for the conference.")
var client = license.Limits[ typeof( NetworkLicenseClientLimit ) ] as NetworkLicenseClientLimit;
var monitor = client.GetMonitor( null );
monitor.Checkout( DateTime.Now.AddDays( 5 ), "Off for the conference." );

Asynchronous Validation

Network network licensing subjects the validation process to extended delays while the network service is located. DeployLX supports asynchronous validation performed on a background thread with the status reported via events.

To support asynchronous validation you must listen to the DelayedValidationFailed event of the SecureLicenseManager class. To receive status notifications you listen to more specific events on the NetworkLicenseClientMonitor.

Public Sub Go()
    AddHandler SecureLicenseManager.DelayedValidationFailed, AddressOf OnDelayedValidationFailed

    Dim license = SecureLicenseManager.Validate(Me, Nothing, Nothing)
    Dim client = TryCast(license.Limits(GetType(NetworkLicenseClientLimit)), NetworkLicenseClientLimit)
    Dim monitor = client.GetMonitor(Nothing)

    AddHandler monitor.LostLicense, AddressOf OnLostLicense

    UpdateStatus(monitor)
End Sub

Private Sub OnLostLicense(ByVal sender As Object, ByVal e As NetworkLicenseClientEventArgs)
    MessageBox.Show(e.Reason)
    Application.Exit()
End Sub

Shared Sub OnDelayedValidationFailed(ByVal sender As Object, ByVal e As LicenseEventArgs)
    Application.Exit()
End Sub

Private Sub UpdateStatus(ByVal monitor As NetworkLicenseClientMonitor)
    If monitor.HasLicense Then
        _status.Text = "License Valid"
    ElseIf monitor.HasTriedToConnect Then
        _status.Text = "License Invalid"
    Else
        _status.Text = "Getting License"
    End If
End Sub
public void Go()
{
    SecureLicenseManager.DelayedValidationFailed += new LicenseEventHandler( OnDelayedValidationFailed );

    var license = SecureLicenseManager.Validate( this, null, null );
    var client = license.Limits[ typeof( NetworkLicenseClientLimit ) ] as NetworkLicenseClientLimit;
    var monitor = client.GetMonitor( null );

    monitor.LostLicense += new EventHandler( OnLostLicense );

    UpdateStatus( monitor );
}

void OnLostLicense( object sender, NetworkLicenseClientEventArgs e )
{
    MessageBox.Show( e.Reason );
    Application.Exit();
}

static void OnDelayedValidationFailed( object sender, LicenseEventArgs e )
{
    Application.Exit();
}

private void UpdateStatus( NetworkLicenseClientMonitor monitor )
{
    if( monitor.HasLicense )
        _status.Text = "License Valid";
    else if( monitor.HasTriedToConnect )
        _status.Text = "License Invalid";
    else
        _status.Text = "Getting License";
}

Network License Service Validation & Configuration

The network license service manages access to the shared licenses on a network. The network license service is protected by a license embedded in the Network Authority that defines the total number of clients allowed.

The Network Authority typically uses an Activation limit so that the network service may only be installed once on a network.

Learn more about the network license service.

See Also