How to Protect your assembly to include Distributor (KB22)

If you wish your protected assembly to be able to utilize SLP Distributor concurrent licensing capabilities you will need to protect your assembly in such a manner as to include the required Distributor client components in your distributables.  This article explains how to do this.

The following is based on the recommended best practice for protection of an assembly,as laid down in the KB12 and KB13 Knowledge Base articles.

If your current permutation is older than 3.1.1918.108 you will need to update your permutation (as per the guidance in http://support.inishtech.com/KB5).

  1. Having downloaded your updated permutation, then in Code Protector select the 'Permutation' tab and then select 'Install Permutation' to add load your permutation file into Code Protector
     
  2. Select the correct mandatory protection settings as follows:


     
    1. Select the Permutation you just loaded
    2. Select Distributor option in Target SLP Runtime Variant drop down list
    3. Select the appropriate Product Name

     
  3. If you are following KB13 then you need to save the SLM configuration file (.SLMCfg extension) alongside your csproj/vbproject file.
     
  4. To protect the assembly you then need to
    1. Set the SLPS_PROTECT compilation symbol in your project file
    2. Add the Feature attribute to the methods to be protected

     
  5. When you build your solution as usual the protected assembly and necessary Distributor redistributables are copied to your project output directory

Please note the subfolder Slps.Distributor.Host that is copied to your project output contains the SLP Distributor service components.  You may wish to package this separately from your protected application (and necessary Distributor client DLLs) e.g. provide a separate installer for each.