Share via


ManagementUnit.ConfigurationPath Property

Definition

Gets the configuration path information for the current management unit.

public:
 property Microsoft::Web::Management::Server::ManagementConfigurationPath ^ ConfigurationPath { Microsoft::Web::Management::Server::ManagementConfigurationPath ^ get(); };
public Microsoft.Web.Management.Server.ManagementConfigurationPath ConfigurationPath { get; }
member this.ConfigurationPath : Microsoft.Web.Management.Server.ManagementConfigurationPath
Public ReadOnly Property ConfigurationPath As ManagementConfigurationPath

Property Value

A ManagementConfigurationPath that contains configuration path information for the current management unit.

Examples

The following example shows the use of the ConfigurationPath property. When the TraceCnfPath method is called when IIS Manager has the App_Data folder or the ra application under the default Web site, the following trace output is displayed.

ConfigurationPath.ApplicationPath "/ra"

FolderPath "App_Data"

PathType "Folder"

SiteName "Default Web Site"

public class DemoModuleService : ModuleService {

    [ModuleServiceMethod]
    public ArrayList GetSettings() {
        ManagementConfiguration manConfig = this.ManagementUnit.Configuration;
        ConfigurationSection appSetSect = manConfig.GetSection("appSettings");
        ConfigurationElementCollection settings = appSetSect.GetCollection();

}
}
public void TraceCnfPath() {

    ManagementUnit mu = this.ManagementUnit;

    Trace.WriteLine("ConfigurationPath.ApplicationPath \"" +
        mu.ConfigurationPath.ApplicationPath + "\"");
    Trace.WriteLine("FolderPath \"" +
        mu.ConfigurationPath.FolderPath + "\"");
    Trace.WriteLine("PathType \"" +
        mu.ConfigurationPath.PathType + "\"");
    Trace.WriteLine("SiteName \"" +
        mu.ConfigurationPath.SiteName + "\"");
} 

Applies to