Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class Licensing

Class that handles all EPiServer related licensing

Inheritance
System.Object
Licensing
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public class Licensing
Remarks

Use IsValidLicense() to determine if this installation has a valid license. This might be useful if some of your functions cannot operate when the restrictions are enforced when a non-valid license is in used. For example DataFactory may throw exceptions if you are running a scheduled job without a license. Otherwise error messages will be appended to output.

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.

Methods

GetErrorMessage()

Get message returned by license check

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

IsLicenseFileValid()

Checks if this instance of EPiServer is using a valid license.

Declaration
[Obsolete("Use ValidateLicense instead")]
public static bool IsLicenseFileValid()
Returns
Type Description
System.Boolean

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

Extension Methods