Class Licensing
Class that handles all EPiServer related licensing
Inheritance
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
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. |
IsFileBased
Indicates if the license information is from file or not.
Declaration
public static bool IsFileBased { get; }
Property Value
Type | Description |
---|---|
System. |
LicenseNumber
Get License number for the running instance
Declaration
public static string LicenseNumber { get; }
Property Value
Type | Description |
---|---|
System. |
An integer that is the license number. |
ResolvedLicenseCheck
The currently resolved license check
Declaration
public static LicenseCheck ResolvedLicenseCheck { get; }
Property Value
Type | Description |
---|---|
License |
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. |
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. |
LicenseMetaData(String)
Get the selected license metadata string
Declaration
public static string LicenseMetaData(string key)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | The license metadata tag |
Returns
Type | Description |
---|---|
System. |
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. |
key | The license metadata tag. |
Returns
Type | Description |
---|---|
System. |
A string with the metadata value |
Exceptions
Type | Condition |
---|---|
License |
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. |