共用方式為


FileExtensionElement 類別

指定要求中允許或拒絕的副檔名。

Syntax

class FileExtensionElement : CollectionElement  

方法

這個類別不包含任何方法。

屬性

名稱 描述
Allowed 讀取/寫入 boolean 值。 true 如果 要求中允許副檔名為 的 FileExtension 檔案,則為 ,否則為 false 。 預設值為 true
FileExtension 唯讀 string 值,指定要求中允許或拒絕的副檔名,視 屬性中的 Allowed 值而定。 索引鍵屬性。

子類別

這個類別不包含子類別。

備註

這個類別的實例包含在 FileExtensionsFileExtensionsSettings 類別的陣列屬性中。 在ApplicationHost.config檔案中,這個類別代表 <fileExtension> 區段底下的 <fileExtensions> 元素。

注意

您必須安裝要求篩選模組 (Modrqflt.dll) ,此組態設定才會生效。

繼承階層架構

CollectionElement

FileExtensionElement

規格需求

類型 描述
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
MOF 檔案 WebAdministration.mof

另請參閱

CollectionElement 類別
FileExtensionsSettings 類別
RequestFilteringSection 類別