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.
The Distributor Host service needs to be running on a network accessible PC. For reasons of performance it is NOT recommended that Distributor be accessed over WANs or remotely over the internet; if the licensed application is installed in multiple locations/offices a separate Distributor instance should be deployed in each location.
Only one Distributor instance can be installed/run on a given machine. Before installing Distributor on a machine one should first check to see if Distributor is already installed on the machine. If a Distributor instance is already installed on the machine, installing a new Distributor instance will delete the already installed instance.
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.Hosts
folder in the NuGet package folder - Configure your installer to install the
Slps.Distributor.Host
folder 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)
install.cmd -install
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).
Diagnostics
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
Stop/start Distributor
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.
Configure Distributor
The 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"/>
- Services\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/"/>
- Web\web.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 BaseUri port value must be the same in BOTH the web.config and Services\Slps.Distributor.Services.dll.config files.
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/"/>
or
<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.
Comments
0 comments
Article is closed for comments.