The Distributor server is installed as a Windows Service on a customer premises to manage concurrent licensing between connected licensed applications. In addition to the licensing service endpoint Distributor also provides a web interface for administration of the service e.g. to activate licenses, view usages etc.
Packaging/Deploying Distributor Server
To properly deploy the Distributor server, you will need to
- Create a setup project using the installer product of your choice e.g. Wix, InstallShield
- Install the Sp.Distrubutor NuGet package to the project.
(If you are using the older SLP Runtime you will have to follow the instructions to Extract Permutation files.)
- Locate the
Slps.Distributor.Hostsfolder in the NuGet package folder
- Configure your installer to install the
Slps.Distributor.Hostfolder on the destination machine on which the service is to be installed.
- Configure your installer to install the Distributor service by calling the install command file in the Slps.Distributor.Host folder.
If you do not wish to build an installer for Distributor, you can instead copy the Slps.Distributor.Host file to the target machine and trigger the install command file from a batch file or the command prompt
Install Distributor Service
The Distributor service is installed by executing the install command file (found in Slps.Distributor.Host folder) with elevated permissions (e.g. running as Administrator)
You can verify that the "Software Potential Distributor" service is running by using Windows Services control panel (Run -> services.msc ).
Once installed, this service will by default listen to HTTP traffic on ports 8731 for Distributor Server and 2468 for Web Console. (These port assignments are configurable).
When the service is running and the required ports (2468 and 8731) are open, the service should perform as expected. Internal diagnostic information is output to trace.log in the directory of each component. Client runtime application errors are output to %temp%\slp.log
You can Stop and Start Distributor service using the Services control panel as follows:
- Locate the Software Potential Distributor Service in the list of installed services
- Right click the Distributor service and in the menu presented select Stop, Start or Restart as appropriate.
The two key Distributor configuration files are:
- Slps.Distributor.Host.exe.config contains appSettings for the port for the Distributor web Admin portal (defaults are 2468).
<Web BaseDir="Web" VDir="/Web" Port="2468"/>
- Service\Slps.Distributor.Services.dll.config contains appSettings for the port on which Distributor Service listens for requests from client applications (default is 8731):
<add key="Slps.Distributor.Service.BaseUri" value="http://localhost:8731/"/>
The customer can update the port settings in these configuration files if the default ports are not appropriate in the network where Distributor is deployed.
The Slps.Distributor.Services.dll.config also contains a setting that controls how often Distributor will check for, and attempt to activate, subscription licenses due for renewal:
<add key="Slps.Distributor.Service.RenewalPollingMinutes" value="5"/>
If you change the Distributor configuration then you will need to restart the Distributor service.
Configure Licensed Application
Your licensed application will require an app configuration file that includes an <appSettings> for the Distributor Server. (i.e. the IP address (or the Server Name) and port of the service). We recommend using Server Name rather than the IP address because Server Name will rarely change which saves the strength to change clients' app config files accordingly:
<add key="Slps.Distributor.Service.BaseUri" value="http://192.168.0.23:8731/"/>
<add key="Slps.Distributor.Service.BaseUri" value="http://<ServerName>:8731/"/>
If you wish the end user to be able to configure the Distributor end-point then you should provide a Distributor configuration UI in your application, to also allow the end user to set and test the Distributor URI configuration to make sure Distributor is contactable from the end-user's device.