Share via


IAppHostConfigManager::GetUniqueConfigPath Method

 

Gets a unique configuration path that represents the deepest path where configuration is defined.

Syntax

HRESULT GetUniqueConfigPath(  
   [in,  
   string] BSTR bstrConfigPath,  
   [out,  
   retval,  
   string] BSTR* pbstrUniquePath  
);  

Parameters

bstrConfigPath
A BSTR that contains a requested configuration path.

pbstrUniquePath
A pointer to a BSTR that contains a configuration path. The returned path represents the deepest location in bstrConfigPath that has an available configuration.

Return Value

An HRESULT. Possible values include, but are not limited to, those in the following table.

Value Description
S_OK Indicates that the operation was successful.

Remarks

The following table shows example input and output values of the GetUniqueConfigPath method. These values require that the configuration has been set at the MACHINE, MACHINE/WEBROOT, and MACHINE/WEBROOT/Site1 levels.

Input values for bstrConfigPath Output values for pbstrUniquePath
MACHINE MACHINE
MACHINE/WEBROOT/Site1 MACHINE/WEBROOT/Site1
MACHINE/WEBROOT/Site1/HelloWorldApp MACHINE/WEBROOT/Site1

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016 Technical Preview
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
- IIS Express 7.5, IIS Express 8.0, IIS Express 10.0
Header Ahadmin.h

See Also

IAppHostConfigManager Interface