다음을 통해 공유


StaticContentSection 클래스

웹 사이트에서 정적 콘텐츠에 대한 구성 설정을 노출합니다.

구문

class StaticContentSection : ConfigurationSectionWithCollection  

메서드

다음 표에서는 클래스에서 노출하는 메서드를 나열합니다 StaticContentSection .

속성 설명
추가 ConfigurationSectionWithCollection에서 상속됩니다.
지우기 ConfigurationSectionWithCollection에서 상속됩니다.
가져오기 ConfigurationSectionWithCollection에서 상속됩니다.
GetAllowDefinition ( ConfigurationSection에서 상속됩니다.)
GetAllowLocation ConfigurationSection에서 상속됩니다.
제거 ConfigurationSectionWithCollection에서 상속됩니다.
RevertToParent ConfigurationSection에서 상속됩니다.
SetAllowDefinition ConfigurationSection에서 상속됩니다.
SetAllowLocation ConfigurationSection에서 상속됩니다.

속성

다음 표에서는 클래스에서 노출하는 속성을 나열합니다 StaticContentSection .

속성 Description
ClientCache 클라이언트 캐싱 구성을 노출하는 읽기/쓰기 HttpClientCache 값입니다.
DefaultDocFooter 사이트의 모든 웹 페이지에 대한 기본 바닥글 텍스트 또는 기본 바닥글 텍스트가 포함된 파일의 경로를 포함하는 읽기/쓰기 string 값입니다. 이 속성을 읽는 방법은 속성의 설정에 IsDocFooterFileName 따라 달라집니다. 기본값은 null입니다.
EnableDocFooter 읽기/쓰기 boolean 값입니다. true 로 표시된 텍스트가 DefaultDocFooter 웹 사이트의 모든 정적 페이지에 나타나면 이고, false그렇지 않으면 입니다. 기본값은 false입니다.
IsDocFooterFileName 읽기/쓰기 boolean 값입니다. trueDefaultDocFooter 문자열에 사이트의 모든 정적 웹 페이지에 대한 기본 바닥글 텍스트가 포함된 파일의 경로가 포함되어 있으면 이고, false그렇지 않으면 입니다. 기본값은 false입니다.
Location (에서 ConfigurationSection상속됨) 키 속성입니다.
Path (에서 ConfigurationSection상속됨) 키 속성입니다.
SectionInformation ConfigurationSection에서 상속됩니다.
StaticContent 정적 콘텐츠에 대한 MIME 맵을 포함하는 읽기/쓰기 MimeMapElement 개체의 배열입니다.

를 서브클래싱합니다.

이 클래스에는 하위 클래스가 없습니다.

설명

이 클래스의 속성은 ApplicationHost.config 파일의 섹션에 <staticContent> 있는 특성 및 요소에 해당합니다.

예제

다음 예에서는 클래스의 바닥글 텍스트 및 client-cache 속성을 StaticContentSection 보여줍니다.

' Connect to the WMI WebAdministration namespace.  
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")  
  
' Get the static content section.  
Set oSection = oWebAdmin.Get("StaticContentSection.Path=" & _  
    "'MACHINE/WEBROOT/APPHOST',Location=''")  
' Show the path and location.  
WScript.Echo "Path: " & oSection.Path  
WScript.Echo "Location: " & oSection.Location  
WScript.Echo  
  
'Show the doc-footer-related properties.  
WScript.Echo "Doc Footer properties"  
WScript.Echo "---------------------"  
WScript.Echo "EnableDocFooter: " & oSection.EnableDocFooter  
WScript.Echo "IsDocFooterFileName: " & oSection.IsDocFooterFileName  
WScript.Echo "DefaultDocFooter: " & oSection.DefaultDocFooter  
WScript.Echo  
  
' Show the embedded client-cache properties.  
Set oClientCache = oSection.ClientCache  
WScript.Echo "ClientCache properties"  
WScript.Echo "----------------------"  
WScript.Echo "CacheControlCustom: " & _  
    oClientCache.CacheControlCustom  
WScript.Echo "CacheControlMaxAge: " & _  
    oClientCache.CacheControlMaxAge  
WScript.Echo "CacheControlMode: " & _  
    oClientCache.CacheControlMode  
WScript.Echo "HttpExpires: " & _  
    oClientCache.HttpExpires  
  

상속 계층 구조

ConfigurationSection

ConfigurationSectionWithCollection

StaticContentSection

요구 사항

형식 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

참고 항목

ConfigurationSection 클래스
ConfigurationSectionWithCollection 클래스
HttpClientCache 클래스
MimeMapElement 클래스