SaaS CMS has officially launched! Learn more now.

Class Licensing

Class that handles all EPiServer related licensing

Inheritance
System.Object
Licensing
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public static class Licensing : Object

Properties

IsCommercialLicense

Determines if current used license is a commercial license

Declaration
public static bool IsCommercialLicense { get; }
Property Value
Type Description
System.Boolean

IsFileBased

Indicates if the license information is from file or not.

Declaration
public static bool IsFileBased { get; }
Property Value
Type Description
System.Boolean

LicenseNumber

Get License number for the running instance

Declaration
public static string LicenseNumber { get; }
Property Value
Type Description
System.String

An integer that is the license number.

ResolvedLicenseCheck

The currently resolved license check

Declaration
public static LicenseCheck ResolvedLicenseCheck { get; }
Property Value
Type Description
LicenseCheck
Remarks

null if no license check have been resolved yet

Methods

GetErrorMessage()

Get message returned by license check

Declaration
public static string GetErrorMessage()
Returns
Type Description
System.String

IsValidLicense()

Checks if this instance of EPiServer is using a valid license in the case where a license is required.

Declaration
public static bool IsValidLicense()
Returns
Type Description
System.Boolean

LicenseMetaData(String)

Get the selected license metadata string

Declaration
public static string LicenseMetaData(string key)
Parameters
Type Name Description
System.String key

The license metadata tag

Returns
Type Description
System.String

A string with the metadata value

LicenseMetaDataUnsafe(String)

Get the selected license metadata string.

Declaration
public static string LicenseMetaDataUnsafe(string key)
Parameters
Type Name Description
System.String key

The license metadata tag.

Returns
Type Description
System.String

A string with the metadata value

Exceptions
Type Condition
LicenseException

License file could not be loaded.

Test()

Test license. Will write errors to response stream if HttpContent is available; otherwise throw error.

Declaration
public static bool Test()
Returns
Type Description
System.Boolean