S + S Deep Dive Training
Hands-on Lab
Session 4.1-Lab
Slps
Step 1. Protect. Net Assembly source code
Target
Identifies and tags core intellectual property rights to help these elements are not decompiled.
Protection of the methods selected in. net source code
1. enable the installation of the successfully installed SLP code protector. You are required to enter your user name and password. Cancel the default logon interface.
2. Select the permutations tab in the SLP code protector, select the installed SLP replacement code eb2d0ae6-24ea-4091-bdb9-185a5d408a94, right-click it, and select set as active.
3. Select the menu item tools and click its drop-down menu server settings. The logon window is displayed again.
User name: xiawa@microsoft.com
Password: Admin
4. After the connection is successful, select the project tab in the SLP code protector.
5. Set the property values on the right of the projtect tab respectively.
(1) target framework: v2.0.50727
(2) permutation: eb2d0a-contoso corperation
6. Click Add modules in the lower-left corner of the projgect tab page,
Select the file "medicalimage.exe" from the C:/slps/medicaldemo/sourcecode/CSHARP/bin/releasedirectory.
7. Expand the method of the specified path under the project node layer by layer (as shown below), and then select the check box on the right of each method.
Get_dbconnection (): Project-> fig, version...-> fig. databaseservices-> fig. databaseservices: get_dbconnection ();
Rotate (): Project-> Medical Image, version...-> Medical Image. window1-> Medical Image. window1: Rotate ()
Crop (): Project-> fig, version...-> fig ()
8. After checking the check boxes of each method, click the protect button in the lower-left corner of the Project tab page.
The SLP code protector is currently converting the Selected methods to prevent them from being decompiled. The message pane in the lower left corner of the SLP code protector contains several messages. When the protection is complete, the Protection succeeded message is displayed.
9. scroll to the top of the Project tab and select. Click remove modules to delete the medicalimage.exe Assembly from the SLP code protector.
10. Disable the SLP code protector.
Step 2 Package, license, and activate the Demo Application
1. Build Product Configuration
Target
Package the Medical Image System to enable and activate the system by function.
Create two new feature sets
Use the username and password you created to log on to the SLP server (https: // slpstest/licenseissueweb) site.
1. select products in the Navigation Pane and click Add product.
2. Enter "Medical Image System" in the product name field and 1.0 in the version field. Add the product description if necessary.
Note: follow the instructions to enter the product name and version number correctly, because the strings will be referenced in the subsequent scheme.
3. Click OK. This product will appear in a new line on the products page.
4. Select the Medical Image System product and click the edit button.
5. On the features tab, click Add feature. Enter the following names in the corresponding name field.
Max # of patients
Rotate
Load to server
These three functions will appear on the features tab.
6. Click the feature sets tab. A default feature set already exists (ignore it ).
7. Click Add feature set and add a feature set named "standard. Add the description text as needed.
8. Click the downward arrow in the available features drop-down box and click Add feature to add the Max # of patients and rotate features to the standard feature set.
9. Click OK to end the creation of the standard feature set.
10. Click Add feature set again to add the feature set named Enterprise. To add the description text. Click Add all features to add Max # of patients, rotate, and load to server.
11. Click OK to create the enterprise feature set. Now both the standard and enterprise feature sets appear on the feature sets tab.
2. Prepare a basic packaging Solution
Target
Test Application packaging and licensing based on standard and enterprise feature sets
Map the features of two feature sets to methods for protection.
1. Open the SLP code protector tool and load the medicalimage.exe application under the C:/slps/medicaldemo/sourcecode/CSHARP/bin/release directory to the SLP code protector.
2. Set the attribute values on the right of the Project tab.
Target framework: v2.0.50727
Project name: Medical Image System 1.0
Permutation: eb2d0a-contoso corperation
3. Click Add modules in the lower-left corner of the projgect tab page,
Select the file "medicalimage.exe" from the C:/slps/medicaldemo/sourcecode/CSHARP/bin/releasedirectory.
4. Expand the method of the specified path under the project node layer by layer (as shown below), and then select the check box on the right of each method.
Get_dbconnection (): Project-> fig, version...-> fig. databaseservices-> fig. databaseservices: get_dbconnection ();
Addpatient (string... String): Project-> Medical Image, version...-> Medical Image. databaseservices-> Medical Image. databaseservices: addpatient (string... String)
Rotate (): Project-> Medical Image, version...-> Medical Image. window1-> Medical Image. window1: Rotate ()
Windowloaded (object, system. eventarges): Project-> medicine image, version...-> medicine image. window1-> medicine image. window1: windowloaded (object, sysetm. eventargs)
Loadtoserver (): Project-> medicalimage, version... -> medicalimage. window1-> medicalimage. window1: After loadtoserver () (only for the loadtoserver method) is checked, select loadtoserver from the drop-down box in the licensing pane on the right side of the corresponding method.
5. Click the protect button to confirm that the Protection succeeded message is displayed in the messages pane. So far, the application is protected and ready to be licensed.
3. release licenses for standard feature sets
1. Return to the SLP server site and click New license in the license area of the navigation pane. The new license page is displayed.
2. Set the following values on the new license page. Add the values shown in the following table to the appropriate fields.
Customer: Click the look up button on the right and select default customer.
Product: select medical image system 1.0 from the drop-down list
Feature set: Standard
3. Click the issue license button in the lower-left corner of the new license page. The next page displays the message with the content licenses issued successfully and an activation key.
4. Click copy to clipboard and copy the activation key for the next step.
5. Run the "C:/slps/medicaldemo/sourcecode/CSHARP/bin/release. Protected" application in the folder, and the activation window will pop up later. Select the I want to activate the software over the Internet option (single choice button ). Activation wizard is enabled. Follow the wizard.
6. Note: You must connect to the server to complete this operation.
7. When the wizard needs to activate the key, right-click the text box and click paste to continue following the wizard. Activation wizard displays a license installed message. Activation complete is displayed after the license is installed.
8. Click Finish to open the application. It has a standard license.
9. Verify that the function is running normally. Remember, the standard license should include a license for Max # of patients and rotate only. Click rotate to rotate the current medical image. However, clicking load to server triggers the following error message: there's-no-license-to-execute-method (load to server ).
10. Close the sample application.
4. delete a license
1. Use client license administrator to delete the standard license. Open the microsoft.licensing.licadmin.exe file under the C:/slps/medicaldemo/sourcecode/CSHARP/bin/release. protected directory.
2. Select the row of the license.
3. Right-click and click Remove. You will receive a message indicating that the license has been successfully deleted. The row where the license is located will also be deleted from the client license administrator.
5. release licenses for enterprise feature sets
1. Return to the SLP server site again, and click New license in the license area of the navigation pane. The new license page is displayed.
2. Set the following values on the new license page. Add the values shown in the following table to the appropriate fields.
Customer: Click the look up button on the right and select default customer.
Product: select medical image system 1.0 from the drop-down list
Feature set: Enterprise
3. Click issue license in the lower-left corner of the page.
4. The next page displays the message with the content licenses issued successfully and an activation key. Click Copy to clipboard and copy the activation key for the next step.
5. run C:/slps/medicaldemo/sourcecode/CSHARP/bin/release. the application program of medicalimage.exe under the protected directory, and provide the activation key as required by activation wizard (right-click and select Paste ). Activation Wizard will display the content as license installed. Activation complete message.
6. Click Finish to open the application, which has an Enterprise License.
7. Remember that this enterprise license includes all functions. Test rotate and load to server to confirm that these functions are running properly.
8. Use client license administrator to delete the Enterprise License, and then close the sample application (see Delete license .)
6. Test the function limit based on the number of times
Objectives:
Verify the permission limit based on the Usage limit
This solution will publish a license for the specified usage of the loadtoserver function. Once the usage is used up, this function cannot be used and you need to release a license again.
1. release a new commercial license for the enterprise feature set (see publishing a License for Enterprise ). Perform the following operations when setting up a license:
A. Click the load to Server feature in the features in License list on the new licence page, and then click Edit.
B. Change the value of the total usage limit field unlimited to 3.
C. Click the select gather usage count check box and select OK.
2. Run the "C:/slps/medicaldemo/sourcecode/CSHARP/bin/release. Protected" Directory of "medicalimage.exe", and activate the application for the preceding permission.
3. Click load to server in the application three times to confirm that the application is running normally.
4. Click the fourth time to confirm that an error message is displayed when this attempt is loaded to the server, indicating that you have no valid permission to perform this function.
5. Return to the SLP server site, and click the reissue license item in the license area of the navigation pane. Select the created license and click Next. Click issue license in the lower-left corner of the reissue license page, and copy the activation key.
6. open C:/slps/medicaldemo/sourcecode/CSHARP/bin/release. client license administrator under the protected directory, select this license, right-click and select reactivate, and paste the activation code to complete the re-activation process.
7. Run the "C:/slps/medicaldemo/sourcecode/CSHARP/bin/release. Protected" directory of the "medicalimage.exe" application again and confirm that the "load to server" function can be used. You can load it to the server three more times.
8. Delete all licenses from the client license administrator and exit the application.