MimeMapElement 클래스
파일 확장명 관련 MIME 형식을 지정합니다.
구문
class MimeMapElement : CollectionElement
메서드
이 클래스에는 메서드가 없습니다.
속성
다음 표에서는 클래스에서 노출하는 속성을 나열합니다 MimeMapElement
.
속성 | Description |
---|---|
FileExtension |
에 대한 MimeType 파일 확장자를 포함하는 필수, 고유하고 흠 없는 읽기 전용 string 값입니다. 키 속성입니다. |
MimeType |
의 확장FileExtension 에 대한 MIME 형식을 포함하는 필수 없음 읽기/쓰기 string 값입니다. |
를 서브클래싱합니다.
이 클래스에는 하위 클래스가 없습니다.
설명
이 클래스의 인스턴스는 StaticContentSection 클래스의 배열 속성에 포함 StaticContent
됩니다.
참고
IIS는 클래스가 지정하는 MIME 형식 및 파일 확장명 조합에 MimeMapElement
대해서만 정적 콘텐츠를 제공합니다. MIME 맵은 정적 파일 처리기에 특정 형식의 요청을 반환하는 방법을 알려줍니다.
예제
다음 예제에서는 서버 수준의 ApplicationHost.config 파일에서 파일 확장명 및 관련 MIME 맵을 나열합니다.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Get the <staticContent> section in ApplicationHost.config.
Set oSection = oWebAdmin.Get( _
"StaticContentSection.Path='MACHINE/WEBROOT/APPHOST',Location=''")
' List the MIME maps by using the StaticContent property of the StaticContentSection class.
For Each oMimeMapElement In oSection.StaticContent
WScript.Echo "File Extension: " & oMimeMapElement.FileExtension
WScript.Echo "Mime Type: " & oMimeMapElement.MimeType
WScript.Echo
Next
상속 계층 구조
MimeMapElement
요구 사항
형식 | Description |
---|---|
클라이언트 | - 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 |