When a resource is embedded directly into the license file the size of the license file will grow significantly so it should be reserved for smaller resources such as logos and written license agreements. Larger resources should either be installed locally or as an embedded resource in the protected assembly.
Use the licres:// protocol as described below to reference a resource embedded in the license.
The .NET Framework supports embedding any file directly into an assembly as an embedded resource. You can reference these resources in your license for images on forms or HTML pages for license terms and information.
Use the asmres:// protocol described below to reference a resource embedded in an assembly.
Resources installed in the same folder as the protected assembly can also be addressed directly.
Use the file:// protocol to reference a resource located on the client's machine. The Assembly Folder variable described below can be used to reference the assembly install folder.
Resources located on remote web servers can also be used by DeployLX forms. Be careful when using remote resources since the resource will be downloaded each time the form is displayed and can delay the startup of your protected application.
When you use an HTML resource for one of the text properties, such as the EULA address, of the license it will be displayed in an embedded browser. The HTML resource can reference other images pages using the same address rules form images. For example, if your embedded EULA.html wants to display an image. The image can be embedded in the same assembly and referenced using the asmres:// protocol in the src attribute of the img tag.
Many of the properties and forms can use resources that have been embedded in a license file or assembly as well as local or remote resources. DeployLX uses standard URLs to address all types of resources and adds two custom protocols for addressing resources embedded in licenses files or assemblies.
Use multiple addresses for each property to provide mirrors for the same resource. To specify more than one address for a single resource, separate each address with a pipe (|) character.
DeployLX supports downloading resources from online locations using the common HTTP, HTTPS and FTP protocols as well as local resources using the FILE protocol. DeployLX also introduces two custom protocols for accessing resources embedded directly in assemblies or the license file.
This scheme will reference a resource embedded directly into the license. licres://license will reference the currently validating license, licres://licensefile will reference the validating license's file.
This scheme will load a resource embedded directly into an assembly. assemblyname is the display name of the assembly (such as System.Windows.Forms or DeployLX.Licensing.v5) without version, or other information. resourcename is the fully qualified name of the resource.
If a resource named trial.png is embedded as a resource in the assembly named Widgets with a default namespace of Acme.Widgets the following address will reference that image.
For C# projects, when you use project folders to organize your resources, Visual Studio will automatically add the name of the folder to the name of the embedded resource. In the example above, if the trial.png file was located in a project folder named Images the address would be
Visual Basic .NET projects do not add folder names to the names of embedded resources.
DeployLX supports replaceable variables in addresses that can be used to point to different resources based on the license or assembly being validated. The address is passed directly to the String.Format method with the following values that can referenced by their index.
The unique LicenseId of the license currently being validated.
The serial number of the license currently being validated.
Serial Number Prefix
The serial number prefix of the license currently being validated. Can often be used at the server to identify the version of the product being validated to return custom information.
The display name of the assembly containing the protected class.
The name of the currently activate culture on the client's machine. Can be used to return culture specific data from a server.
The name of the product being validated. Obtained by the request info provided when validation began.
The version of the product begin validated. Obtained by the request info provided when validation began.
The name of the manufacturer included in the request info provided when validation began.
The address of the customer support website included in the request info provided when validation began.
The full path to the location where the protected assembly was loaded from. Valid only with the file:// protocol.
The full path to the folder where the protected assembly was loaded from. Can be used to reference locally installed resources in the same folder as the assembly. Valid only with the file:// protocol.
Each of the registration fields (except the serial number) captured when the license was registered. Each field is expanded to a name=value pair into the resulting url.