ManagementAuthorizationInfo.Name Property

Definition

Gets the user name or role of the authorized user.

public:
 property System::String ^ Name { System::String ^ get(); };
public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String

Property Value

The name or role that is in the configuration path for the authorized user.

Examples

The following example displays a collection of ManagementAuthorizationInfo objects and displays the Name property values for each element of the collection. This code example is part of a larger example provided for the ManagementAuthorization class.

foreach (ManagementAuthorizationInfo authorizedInfo in authorizedCollection)
{
    message = message + "\nName: " + authorizedInfo.Name;
    message = message + "     ConfigurationPath: " + 
        authorizedInfo.ConfigurationPath;
    message = message + "     IsRole: " + authorizedInfo.IsRole;

    // Check to see if the user is already in the allowed users collection.                
    if (userName.Equals(authorizedInfo.Name))
    {
        isInCollection = true;
    }
}

Remarks

The Name property of each authorized user is displayed on the IIS Manager Permissions page in IIS Manager.

The values of the Name and IsRole properties are stored together in the Administration.config file.

Applies to