This sample demonstrates a typical ASP.NET application protected by DeployLX Licensing. The licensed application is protected by a serial number and hardware locked.
Download the sample files, save them to your desktop and extract the files. The starter kit includes both C# and Visual Basic versions. Navigate to the desired language and open the solution file.
The license files and projects have been protected with the default sample keys included with the DeployLX install. All references to the licensing runtime assume that DeployLX was installed to the default location on a 32-bit machine. If you're running a 64-bit OS, or you've installed DeployLX to a different location, you'll need to update the references to point to your installation.
See Building the Licensing Samples for details on updating the sample projects for your machine.
If you're exploring the trial version of DeployLX, the starter kit will work without changes. If you've purchased DeployLX and you're using the release version you must update the LicenseServer.asmx file to use the serial number issued by XHEO when you purchased.
The sample application is unlocked with a serial number. To generate a serial number for your installation
The LicenseHelper class serves as a utility class for interacting with the DeployLX Licensing runtime. It was generated automatically by the Protect Project wizard in DeployLX. The default implementation works for the most common scenarios, and can be customized to meet individual application requirements.
When the application is started, the MainForm creates a new instance of the LicenseHelper class and invokes the Required method. The Required method in turn prepares a request to the licensing runtime and asks for a valid license. If a valid license cannot be found, then an exception is logged and thrown. If a valid license can be found, it is saved and used to expose properties of the license state. After a valid license has been obtained, the MainForm updates it's menu's and controls to reflect the license state.
For each page in the application that the user must have a license for, it must check for a valid license from DeployLX on each request. The ProtectedPage class serves as a base class to manage invoking the LicenseHelper on each request. By inheriting from ProtectedPage, the page will automatically request a license as needed.