IAppHostSectionDefinition::AllowLocation 属性

获取或设置一个值,该值指示配置节是否允许位置属性。

语法

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

parameters

pbstrAllowLocation
指向 BSTR 的指针,指示配置节是否允许 ___location 属性。 有效值为“true”或“false”。 默认值为“true”。

bstrAllowLocation
一个 BSTR ,指示配置节是否允许位置属性。 有效值为“true”或“false”。

返回值

HRESULT。 可能的值包括(但并不限于)下表中的项。

说明
S_OK 指示操作成功。

备注

注意

此属性使用BSTR“true”和“false”的值,而不是 booleanfalse的值true

要求

类型 说明
客户端 - 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
Header Ahadmin.h

另请参阅

IAppHostSectionDefinition 接口