Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ManagementAuthorizationInfo Class

IIS 7.0

Encapsulates information about an authorized user.

System..::..Object
  Microsoft.Web.Management.Server..::..ManagementAuthorizationInfo

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

The ManagementAuthorizationInfo type exposes the following members.

  NameDescription
Public methodManagementAuthorizationInfoInitializes a new instance of the ManagementAuthorizationInfo class.
Top
  NameDescription
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.
Top
  NameDescription
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.)
Top

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: " + 
        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;
    }
}


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.