Contents - Index


3.4 Networking

Overview

Sheriff is designed to protect applications running on networks. In particular, the concurrency limit is used to control the maximum number of users that can simultaneously access a Sheriff-protected application. The network can be a local or wide area network, which can span time zones. The network protocol is of no importance.

Use SlsGen to Define the Licence

Whether or not a Sheriff-protected application can be run over a network will depend upon the type of licence policy that was defined using the Sheriff Licence Generator (SlsGen).

  • A standalone licence is a licence for a single user. The protected application can only be run on the machine on which the licence is installed and cannot be shared by network users on different machines. A standalone licence cannot be shared by two operating systems running on a dual-boot PC.

  • A network licence permits more than a single user and its licence database is usually located in a shared network file server. The maximum number of concurrent users is defined using SlsGen.

Installing Sheriff on a Network

To install Sheriff on a network, you need to have only one licence database installed; typically this will be on a file server that is accessible to all of the users who want to run the protected application.

Files

You need to install the following files on the server:

\\BIN\SlsLocal.dll
\\BIN\SlsServer.exe
\\BIN\SlsService.exe
You may install those files at any location on the server machine. A file "slsService_legacy.exe" is provided for versions of Windows prior to XP/Server 2003. Please rename to "slsService.exe".

SlsServer

The server process is called SlsServer. If you are only running a single Sheriff-protected product on the server you can invoke SlsServer from the command line:

[home]\SlsServer.exe /port:8080 /pid:9758-3050-1918-9292-6466 /pn:Sheriff Demo /pp:C:\Sheriff

[home] is the path where SlsServer resides (specify if executed from different folder)
"port" parameter set the TCP/IP port that Sheriff server will be listening to
"pid" is your Product ID
"pn" is your Product Name
"pp" is your Product Licence Path

All of the above parameters are optional. If "port" is not specified, Sheriff Server will listen to port 8080. If "pid", "pn" and "pp" are not specified then Sheriff Server will find product info from the registry.

Alternatively, instead of registering your product using "pid", "pn" and "pp" command line parameters, you can register your product by creating a file called "SlsServer.ini" and placing it in the same folder as SlsServer.exe. If you have more than one Sheriff-protected product, then creating the SlsServer.ini file is mandatory.

The following is an example of SlsServer.ini

[Settings]
Products=2
[Product0]
ID=9758-3050-1918-9292-6466
NAME=Demo 1
PATH=C:\Demo
[Product1]
ID=5359-8631-2629-7641-5701
NAME=Demo 2
PATH=C:\Demo

Where, "Products" in the "Settings" section specifies the total number of products and within each product section there are three variables, namely:

ID: Product ID
NAME: Product Name
PATH: Product Licence Path

SlsService

It is usually convenient to run SlsServer as a service. SlsService can run any executable as a service -- if you just want to run SlsServer then leave Processes=1. SlsService starts the server via SlsServer.ini, where it contains the command line parameters:

CommandLine = [home]\SlsServer.exe /port:8080 /pid:9758-3050-1918-9292-6466 /pn:Sheriff Demo /pp:C:\Sheriff

[home] is the path where SlsServer resides (specify if executed from different folder)
"port" parameter set the TCP/IP port that Sheriff server will be listening to
"pid" is your Product ID
"pn" is your Product Name
"pp" is your Product Licence Path

To install the service, run the following command:

  SlsService -i

Licensing the Server

To install a licence on the server, you can either run SlsAdmin on the server machine, or you can call SLS_SetLicence from your own application running on any machine that is connected to the Sheriff Server

Upgrading Notes

  1. SlsClock is now obsolete. It is no longer provided.
  2. Like the standalone licence, a network licence is now locked to the server machine, not just the hard disk, making it more secure.
  3. Connecting to a network licence via a shared drive/folder is no longer supported.
Once a licence is installed on a network drive, applications running on workstations should be registered. Registering a product creates the appropriate key in the Windows Registry. The key contains important information about the licence file i.e. its name and location. Registration can either be accomplished programmatically or else by using the Sheriff Administrator (SlsAdmin).

Networking environments can be highly complex and it is very desirable to allocate one machine - probably the server - for licence administration. Thus, if you intend to issue licence keys from a machine on the network you would install SlsGen on this administrator machine and also use the same machine to manage the licence keys with SlsAdmin - see below.

Use SlsAdmin to Manage Network Licences

Use the SlsAdmin application to monitor active programs and which active users have access to them. You can also suspend an active user at any time although normally you will only do this you when you have reached the limit of authorised concurrent licences and you wish to grant access to another user.

Licence Reclaim

If a networked application terminates abnormally without notifying Sheriff, its licence also dies.

Sheriff will automatically reclaim the dead licence after the expiration of a predefined 'reclaim time' (which must be longer than the 'heart-beat' time). Once a licence has been reclaimed by Sheriff it can be claimed by another network user, however should the terminated application request a licence within the 'reclaim time' Sheriff will revive the dead licence immediately for that application.