既定でクライアントに提供する Web ページ ファイル名を指定します。
構文
class DefaultDocumentSection : ConfigurationSectionWithCollection
メソッド
次の表に、DefaultDocumentSection クラスによって公開されるメソッドの一覧を示します。
| 名前 | 説明 |
|---|---|
| [追加] | (ConfigurationSectionWithCollection から継承。) |
| Clear | (ConfigurationSectionWithCollection から継承。) |
| Get | (ConfigurationSectionWithCollection から継承。) |
| GetAllowDefinition | (ConfigurationSection から継承。) |
| GetAllowLocation | (ConfigurationSection から継承。) |
| 削除 | (ConfigurationSectionWithCollection から継承。) |
| RevertToParent | (ConfigurationSection から継承。) |
| SetAllowDefinition | (ConfigurationSection から継承。) |
| SetAllowLocation | (ConfigurationSection から継承。) |
プロパティ
次の表は、DefaultDocumentSection クラスによって公開されるプロパティの一覧です。
| 名前 | 説明 |
|---|---|
Enabled |
読み取り/書き込みの boolean 値。 Files プロパティで指定されたファイルが既定でクライアントに返される場合は true。それ以外の場合は false。 既定値は、true です。 |
Files |
既定で Web サーバーがクライアントに返すファイルの名前を含む FileSettings 値。 |
Location |
(ConfigurationSection から継承。)キー プロパティ。 |
Path |
(ConfigurationSection から継承。)キー プロパティ。 |
SectionInformation |
(ConfigurationSection から継承。) |
サブクラス
このクラスにはサブクラスが含まれていません。
解説
このクラスは、ApplicationHost.config の <defaultDocument> セクションに対応します。
例
次の例では、既定の Web サイトの既定のドキュメントを一覧表示します。
' 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
継承階層
ConfigurationSectionWithCollection
DefaultDocumentSection
要件
| 型 | 説明 |
|---|---|
| クライアント | - 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 |
| Product | - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0 |
| MOF ファイル | WebAdministration.mof |
参照
ConfigurationSectionWithCollection クラス
FileSettings クラス
Site クラス