Class Licensing
Class that handles all EPiServer related licensing
Inheritance
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 8.11.0Syntax
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
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 |
---|---|
EPiServer.Licensing.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 |