ManagementAuthorizationInfo Class

ManagementAuthorizationInfo Class

IIS 7.0

Encapsulates information about an authorized user.


Namespace:  Microsoft.Web.Management.Server
Assembly:  Microsoft.Web.Management (in Microsoft.Web.Management.dll)

public class ManagementAuthorizationInfo

The ManagementAuthorizationInfo type exposes the following members.

Public methodManagementAuthorizationInfoInitializes a new instance of the ManagementAuthorizationInfo class.

Public propertyConfigurationPathGets the configuration path for which authorization is granted.
Public propertyIsRoleGets a value indicating whether the value specified in the Name property is a security role.
Public propertyNameGets the user name or role of the authorized user.

Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)

This class contains information about each authorized user and is returned by the GetAuthorizedUsers method. This information is written to and read from the Administration.config file. There is one ManagementAuthorizationInfo object for each authorized user in each scope path of the Administration.config file.

The following example obtains a collection of ManagementAuthorizationInfo objects and displays the 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: " + 
    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;

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

© 2016 Microsoft