Search Results for

    Show / Hide Table of Contents
    View Source

    Class AzureWebsiteInstanceIdMachineIdentityProvider

    Returns the machine identifier from the WEBSITE_INSTANCE_ID environment variable set by Azure App Service.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Factories
    Assembly: Umbraco.Core.dll
    Syntax
    public class AzureWebsiteInstanceIdMachineIdentityProvider : IMachineIdentityProvider
    Remarks

    WEBSITE_INSTANCE_ID identifies the instance slot and remains stable across container recycles, unlike Environment.MachineName which changes on every recycle on Azure App Service Linux.

    Returns null when the environment variable is not present (i.e. outside Azure App Service).

    Constructors

    View Source

    AzureWebsiteInstanceIdMachineIdentityProvider()

    Declaration
    public AzureWebsiteInstanceIdMachineIdentityProvider()

    Fields

    View Source

    WebsiteInstanceIdEnvironmentVariable

    The name of the Azure App Service environment variable that identifies the instance slot.

    Declaration
    public const string WebsiteInstanceIdEnvironmentVariable = "WEBSITE_INSTANCE_ID"
    Field Value
    Type Description
    string

    Methods

    View Source

    GetMachineIdentifier()

    Gets the machine identifier, or null if this provider does not apply.

    Declaration
    public string? GetMachineIdentifier()
    Returns
    Type Description
    string
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX