DataProtectionUtilityExtensions.GetApplicationUniqueIdentifier Method

Definition

Returns a unique identifier for this application.

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ GetApplicationUniqueIdentifier(IServiceProvider ^ services);
public static string GetApplicationUniqueIdentifier (this IServiceProvider services);
public static string? GetApplicationUniqueIdentifier (this IServiceProvider services);
static member GetApplicationUniqueIdentifier : IServiceProvider -> string
<Extension()>
Public Function GetApplicationUniqueIdentifier (services As IServiceProvider) As String

Parameters

services
IServiceProvider

The application-level IServiceProvider.

Returns

A unique application identifier, or null if services is null or cannot provide a unique application identifier.

Remarks

The returned identifier should be stable for repeated runs of this same application on this machine. Additionally, the identifier is only unique within the scope of a single machine, e.g., two different applications on two different machines may return the same value.

This identifier may contain security-sensitive information such as physical file paths, configuration settings, or other machine-specific information. Callers should take special care not to disclose this information to untrusted entities.

Applies to