Introduction to SLP Services Configuration


In previous article, we had looked into SLP Code Protector and its implementation. In this article, we will discuss about adding products/ feature sets followed by Code Protector Integration with Build process. SLP Online Services allows us to add a product, design a feature set and issue license to protect our intellectual property and enforce licensing policies. SLP Services provides various licensing models for ISVs (Independent Software Vendors).

Login into the SLP Site and enter your account details. We will see how to add a product. Click on Products and select Add Product. Enter a name and version of the product. Click on Ok to add the product to your account.

We can add a Perpetual License by clicking on New License in License section. A Perpetual License is the default license model. Fill in the customer and product details and click on Issue License. This will create a new Perpetual License.  Now, we will see how to issue an evaluation license. An evaluation license is a non-commercial license and is available only for evaluation purpose.  We will see the steps to create the license:

  • Click New Template License in the License.
  • Click Non-Commercial, and then select the product. This creates a license as a trial or evaluation type.
  • Select the product from Product list.
  • Select Feature Set.
  • Select Start Date and change the Concurrent Usage Limit as per the requirement. 
  • Set Expiration date and change Total Usage Limit.
  • Set Grace period
  • Add description and click on Issue License.

Now, we will see how to create Time-limited Subscription. A time-limited subscription enables full use of the product with the only limitation being the length of time that it may be valid for using. We will see the steps to create the subscription:

  • Click New Template License in the License.
  • Click Commercial, and then select the product. This creates a license as a trial or evaluation license.
  • Select the product from Product list.
  • Select Feature Set.
  • Select Start Date and change the Concurrent Usage Limit as per the requirement. 
  • Set Expiration date and change Total Usage Limit.
  • Click Renewable box if you want to enable the evaluation license for renewal.
  • Click Gather Execution Count to gather statistics about application usage frequency. It is not mandatory.
  • Add description and click on Issue License.

We will look how to create features and group it into feature sets. In order to create features and feature sets, we need to follow below steps:

  • Click Products in the navigation panel.
  • Click a product in the Products table and select Edit.
  • Click on Add Feature and enter Name and Description.
  • Click Ok to save the new feature.
  • Click on Features Set tab and select Add Feature Set.
  • Add Name and Description and select feature from Available Features drop down and click on Add Feature.
  • Click Ok to save the changes.

So, by following above steps we can create a product, feature set, licenses and subscriptions using SLP Online Services. Now, we will see how to integrate SLP Code Protector with our Build process. SLP Code Protector can be integrated using the command-line provided or using Post Build Events. We will discuss command-line integration; SLP Code Protector has a command-line application to integrate code protection as part of our build process. Using command-line integration is efficient, when the application is in development phase. Open your SLP Code Protector application and add the modules and select the methods that need to be protected by checking those. Click on Save Project As and give a name having extension as "SLMCfg". Now, we can apply protection by using Microsoft.Licensing.ProtectCmd.exe tool present in SLP Code Protector Installation folder. The syntax for using this command-line tool is:

Microsoft.Licensing.ProtectCmd.exe <<Path of Config File>>.

Command-line protection cannot be applied if a generic Permutation is used. You must first create a private Permutation by using SLP Online Services. Using command-line requires to run it manually on each build. We can automate using build events.

We make this protection automatic on build using Post-Build Events. Add the Code Protector Configuration file (.SLMCfg) to your solution. Change the values for InputDir, OutputDir, and ModuleName to the required directories. Open the Build Events tab by going to project properties and add the below statement to post-build event textbox:

"C:\Program Files\Microsoft SLP Code Protector\Microsoft.Licensing.ProtectCmd.exe" "$(ProjectDir)$(ConfigurationName).SLMCfg". 

So, by setting post-build event, we can make sure that protection will be applicable automatically on each build process.

Note: SLP Code Protector currently supports 1.1 and 2.0 frameworks only.
 
I am ending up the things here. I hope this article will be helpful for all.


Similar Articles