共用方式為


IAppHostSectionDefinition::AllowLocation 屬性

取得或設定值,這個值表示組態區段是否允許位置屬性。

語法

HRESULT get_AllowLocation(  
   [out,  
   retval] BSTR* pbstrAllowLocation  
);  
HRESULT put_AllowLocation(  
   BSTR bstrAllowLocation  
);  

參數

pbstrAllowLocation
BSTR 指標,指出組態區段是否允許 location 屬性。 有效的值為 "true" 或 "false"。 預設值為 「true」。

bstrAllowLocation
BSTR 指出組態區段是否允許位置屬性。 有效的值為 "true" 或 "false"。

傳回值

HRESULT。 可能的值包括 (但不限於) 下表中的這些值。

描述
S_OK 表示作業成功。

備註

注意

此屬性使用 BSTR 「true」 和 「false」 的值,而不是 booleanfalse 的值 true

規格需求

類型 描述
Client - Windows Vista 上的 IIS 7.0
- Windows 7 上的 IIS 7.5
- Windows 8 上的 IIS 8.0
- Windows 10上的 IIS 10.0
伺服器 - Windows Server 2008 上的 IIS 7.0
- Windows Server 2008 R2 上的 IIS 7.5
- Windows Server 2012 上的 IIS 8.0
- Windows Server 2012 R2 上的 IIS 8.5
- Windows Server 2016上的 IIS 10.0
產品 - 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
標頭 Ahadmin.h

另請參閱

IAppHostSectionDefinition 介面