Knowledge Base

Enabling Developer Mode

DeployLX Licensing supports a lightweight diagnostic mode that captures additional details and modifies behavior to make it easier during development to diagnose issues and test licenses.

To Enable Developer Mode

To enable Developer Mode, you set the DeveloperMode property of the LicenseValidationRequestInfo object to true before calling SecureLicenseManager.

var info = new LicenseValidationRequestInfo();
#if DEBUG
info.DeveloperMode = true;
#endif
_license = SecureLicenseManager.Validate( this, null, info );

Using #if DEBUG ensures that Developer Mode is not enabled in the release build.

Effects of Developer Mode

When Developer Mode is enabled the following behavioral changes are applied.

  1. After validation has completed, a message is displayed indicating the application is still in developer mode when no debugger is attached.
  2. Exceptions caught during license validation are reported in their entirety instead of recording just the error message. This includes stack trace and inner exception details.
  3. Serial numbers and activation codes will not be peristed to the machine so that license modification and testing are easier.
  4. Clock check errors are reported.
  5. Errors on the license server will be reported in complete detail.
  6. The last license and license file to be validated on the server will be stored in HttpContext.Current.Cache["DeployLX.LastLicense"] and HttpContext.Current.Cache["DeployLX.LastLicenseFile"] respectively.
  7. If the server connect timeout has not been manually configured then the timeout is automatically changed from the default 2 minutes to 10 minutes.
  8. Clears any secure storage tamper detection of the user receives a "Could not acquire secure storage" message.

Additional Developer Mode Options

The following additional LicenseValidationRequestInfo properties are useful during development.

PropertyBehaviorDeveloperMode Required
DontPersistToStorage DeployLX does not save any client state -- such as the time remaining in a trial -- to secure storage Yes
SimulateOffline Test licenses that use a license server as if the machine was not connected to the internet. Yes
ShouldGetNewSerialNumber DeployLX will ignore any serial numbers currently stored in the license. Useful during development to test the registration process. No
TestDate Safely test the behavior of time limited licenses without changing the system clock. No

Related Articles

Published : Aug 13, 2009
Updated : Mar 08, 2010
Views : 4885

Applies To

DeployLX Licensing 4.x
DeployLX Licensing 3.x

Creative Commons LicenseDownloads

Tags

Folder

View the discussion thread without JavaScript.