DeployLX uses an advanced search algorithm to locate a license file installed on the users machine. This topic discusses how license files are located and where you can install the license file for it to be found.
When a license is requested by the protected software, the SecureLicenseManager will search the client machine for a valid license file. When searching DeployLX will check each of the locations listed below and return the first valid license that it can find using the following rules.
- License files will be validated in the order found.
- Licenses that display an interface to the user will always be validated after licenses that do not show a user interface.
- Trial licenses will always be validated after non-trial licenses.
Search Locations in Order
- Cached license that was previously validated and returned.
- Manually defined license file passed in the license request.
- Licenses compiled into the calling assembly.
- License files on disk in the search path in alphabetical order..
- Embedded runtime.lic
- Licenses that needed to display an interface in the order that were collected while searching in the other locations.
- Trial licenses in the order they were found that were collected while searching in the other locations.
DeployLX will search in each folder and evaluate each license file found. Licenses are evaluated in alphabetical order within each search folder using the sort order defined by the current culture settings in the operating system. If a license is found that displays an interface to the user or contains a Trial limit it is collected for later evaluation until all other licenses are evaluated.
- Folders in the LicenseValidationRequestInfo.SearchPaths collection.
- AppDomain LicenseFile
- When working in Visual Studio .NET and adding a protected component or control to a project
- Project folder
- Project\Bin folder for Web projects
- Project build output folder
- Project debug working folder
- Location of assembly reference in Visual Studio .NET
- CodeBase of protected assembly
- CodeBase of entry assembly
- BaseDirectory of current AppDomain
- RelativeSearchPath of current AppDomain
- ApplicationBase of current AppDomain
- PrivateBinPath of current AppDomain
- PrivateBinPathProbe of current AppDomain
- Configured SharedFolder (By default at [Common Application Data]\XHEO INC\SharedLicenses)
DeployLX supports embedding a license file directly into the protected assembly. By embedding the license file directly installation of your protected assembly is much easier. When your software can be unlocked with a serial number the end user never needs to even know about the existence of a license file. The embedded assembly is checked last so that license files installed on disk can override the embedded license.
To embed a runtime.lic file in an assembly
- Create a new license file in the DeployLX Manager.
- Save it as runtime.lic in the project folder of your protected assembly.
- In Visual Studio .NET select the protected project and select Project | Add Existing Item from the menu.
- Select the license file saved in step 2.
- Open the Properties window (Press F4).
- Change the Build Action of the runtime.lic file to Embedded Resource.
- Compile the project.
When a protected control or component is dropped onto the design surface of Visual Studio .NET by a third party developer a licenses.licx file is created and populated with instructions used by the compiler to compile a license file directly into the assembly. When the license is compiled DeployLX will insert a copy of the entire parent license file into the 3rd party assembly. When the 3rd party application is run the original license can be validated without requiring the developer to include a copy of their license.
If the original license was an embedded runtime.lic file, the recommended method, then DeployLX will not embed a license in the 3rd party assembly instead favoring the license embedded in the protected assembly.