다음을 통해 공유


DefaultDocumentSection Class1

기본적으로 클라이언트에 제공할 웹 페이지 파일 이름을 지정합니다.

구문

class DefaultDocumentSection : ConfigurationSectionWithCollection  

메서드

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

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

속성

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

속성 Description
Enabled 읽기/쓰기 boolean 값입니다. true 속성에 Files 지정된 파일이 기본적으로 클라이언트에 반환되면 이고, false그렇지 않으면 입니다. 기본값은 true입니다.
Files 웹 서버가 기본적으로 클라이언트로 반환할 수 있는 파일의 이름을 포함하는 FileSettings 값입니다.
Location (에서 ConfigurationSection상속됨) 키 속성입니다.
Path (에서 ConfigurationSection상속됨) 키 속성입니다.
SectionInformation ConfigurationSection에서 상속됩니다.

를 서브클래싱합니다.

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

설명

이 클래스는 ApplicationHost.config 섹션에 해당합니다 <defaultDocument> .

예제

다음 예제에서는 기본 웹 사이트의 기본 문서를 나열합니다.

' Connect to the WMI WebAdministration namespace.  
Set objWMIService = GetObject("winmgmts:root\WebAdministration")  
  
' Get the default Web site.  
Set oSite = objWMIService.Get("Site.Name='Default Web Site'")  
  
' Retrieve the default document section by using the GetSection method.  
oSite.GetSection "DefaultDocumentSection", oDefaultDocumentSection  
  
' List the path and show whether the default document section is enabled.  
WScript.Echo "Path: " & oDefaultDocumentSection.Path  
WScript.Echo   
WScript.Echo "Default Document Section Enabled: " & oDefaultDocumentSection.Enabled  
WScript.Echo   
  
' List the default document file names.  
WScript.Echo "[Default Document File List]"  
For Each oFile In oDefaultDocumentSection.Files.Files  
        WScript.Echo oFile.Value  
Next  
  

상속 계층 구조

ConfigurationSection

ConfigurationSectionWithCollection

DefaultDocumentSection

요구 사항

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

참고 항목

ConfigurationSectionWithCollection 클래스
FileSettings 클래스
사이트 클래스