Connection.ConfigurationPath Property

Definition

Gets the configuration path 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 object.

Examples

public LinkedList<string> ConfigurationPath(IServiceProvider sp) {

    Connection con = (Connection)sp.GetService(typeof(Connection));
    LinkedList<string> llp = new LinkedList<string>();
    ManagementConfigurationPath mcp = con.ConfigurationPath;

    llp.AddLast("ApplicationPath: " + mcp.ApplicationPath);
    llp.AddLast("FolderPath: " + mcp.FolderPath);

    llp.AddLast("GetEffectiveConfigurationPath Application: " +
        mcp.GetEffectiveConfigurationPath(ManagementScope.Application));
    llp.AddLast("GetEffectiveConfigurationPath Server: " +
        mcp.GetEffectiveConfigurationPath(ManagementScope.Server));
    llp.AddLast("GetEffectiveConfigurationPath Site: " +
        mcp.GetEffectiveConfigurationPath(ManagementScope.Site));
    llp.AddLast("PathType: " + mcp.PathType.ToString());
    llp.AddLast("SiteName: " + mcp.SiteName);
    return llp;

}

Remarks

This property gets the configuration path for the current management unit. An empty configuration path indicates the root configuration path that is associated with the current management unit.

Note

When the configuration path is accessed from an application or site, the Microsoft.Web.Management.Server.ManagementConfigurationPath.ApplicationPath and Microsoft.Web.Management.Server.ManagementConfigurationPath.FolderPath properties will be empty. When the path is accessed from the Bin directory of a site, the value of the ApplicationPath property will be "/" and the value of the FolderPath property will be "Bin". When the path is accessed from the Bin directory of the application, the value of the ApplicationPath property will be "/" followed by the application name (for example, "/ExampleApp") and the value of the FolderPath property will be "Bin". This is by design.

Applies to