ManagementAuthorization.GetConfigurationPaths Method (IPrincipal, String)

IIS 7.0
 

Returns an array of configuration paths that the specified principal is authorized to configure.

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

public static string[] GetConfigurationPaths(
	IPrincipal principal,
	string baseConfigurationPath
)

Parameters

principal
Type: System.Security.Principal.IPrincipal

A System.Security.Principal.IPrincipal interface that represents the security context of the user for whom the paths are retrieved.

baseConfigurationPath
Type: System.String

The base of the configuration path under which to search.

Return Value

Type: System.String[]

An array of configuration paths that the specified principal is authorized to configure.

Exception Condition
System.ArgumentNullException

principal is null.

This method returns all configuration paths, starting with the baseConfigurationPath parameter, for which the principal is an authorized user and has access permissions. Set baseConfigurationPath to empty or null to search the entire site. baseConfigurationPath determines which nodes in the Administration.config file can be searched for authorized users.

The following example demonstrates the GetConfigurationPaths method. This code example is part of a larger example provided for the ManagementAuthorization class.

The following example sets the principal parameter to an object that enables you to check the Windows group membership of the current user.

Return to top
Show: