Introduction to SLP Services Environment Setup
This article explains about SLP Environment setup followed by Code Protection sample.
In this article, we will look into setting up the environment for SLP Services. For small ISVs, it is hard to maintain their own licensing systems. So, it is feasible to go with SLP online services provided by Microsoft. In order to use SLP online services, we need to have an account. Go to SLP Site and click on New User as shown below:
Than enter product key as shown below:
As a beginner, we can get an evaluation key. Than click on Next to accept the license agreement. Finally, enter username, company name followed by password. It will create an account, by which we can generate/download SLP Permutation and manage products, licenses and customers. Now, we need to create SLP Permutation. This will have unique SVM, a transformation algorithm to convert MSIL code to SVML and a digital key to protect it.
We will create a new SLP permutation, which will in turn create new private SVM for us.
Click on New Permutation and give a name and click Ok. Download that SLP Permutation to local disk. Now, install the Code Protector SDK from here. Open your SLP Code Protector application and enter your user name and password (entered while creating SLP account). Install the Permutation, by clicking on New Permutation and selecting the downloaded permutation. Now, browse the assembly for which we need to provide protection. I created a sample class library having connection string in it. I will open it in Reflector to decompile and see connection string as shown below:
Select appropriate Target Framework and Permutation as newly downloaded permutation in Code Protector. Now, we will make GetConnectionString() as protected one. Open this assembly in Code Protector by clicking on Add Modules and check that method and click on Protect as shown below:
Now, open the protected assembly in reflector. The code in GetConnectionString() method will be as shown below:
Actual connection string is replaced by a method call to SVM with a string of random characters. In this way, we can protect our code from Reverse engineering using SLP Code Protector.
I am ending up the things here. I hope this article will be helpful for all.