ManagementConfigurationPath.GetEffectiveConfigurationPath Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the effective configuration path for an application, Web site, or server.
public:
System::String ^ GetEffectiveConfigurationPath(Microsoft::Web::Management::Server::ManagementScope scope);
public string GetEffectiveConfigurationPath (Microsoft.Web.Management.Server.ManagementScope scope);
member this.GetEffectiveConfigurationPath : Microsoft.Web.Management.Server.ManagementScope -> string
Public Function GetEffectiveConfigurationPath (scope As ManagementScope) As String
Parameters
- scope
- ManagementScope
The management scope.
Returns
This method returns one of the following values:
The folder path, if the value of the
scope
parameter is an application.The application configuration path, if
scope
is a Web site.The site name and the application configuration path, if
scope
is a server and an application path exists.The site name, if
scope
is a server and no application path exists
Examples
The following example adds details of the ManagementConfigurationPath object to a linked list.
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;
}