defaultDocument Element [IIS Settings Schema]
Note
For more information about the defaultDocument element, see the following topic on the Microsoft IIS.net Web site: Default Document <defaultDocument>.
Configures settings for returning a default document to a client browser when the client does not specify a file name in a request.
Syntax
Attributes and Elements
The following sections describe attributes, child elements, and parent elements for this section.
Attributes
Attribute |
Description |
---|---|
enabled |
Optional Boolean attribute. Specifies that default documents are enabled. The default value is true. |
Child Elements
Element |
Description |
---|---|
files |
Optional element. Specifies a list of file names that can be returned as default documents. |
Parent Elements
Element |
Description |
---|---|
configuration |
Specifies the root element in every configuration file that is used by IIS 7. |
system.webServer |
Specifies the root element in ApplicationHost.config that is the top-level section group in which this element is defined. |
Remarks
For more information about the defaultDocument element, see the following topic on the Microsoft IIS.net Web site: Default Document <defaultDocument>.
Default Configuration
The following default <defaultDocuments> element is configured in the root ApplicationHost.config file in IIS 7 when the Default Document role service is installed. This configuration section inherits the default configuration settings unless you use the <clear> element.
<defaultDocument enabled="true">
<files>
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
</files>
</defaultDocument>
Element Information
Configuration locations |
Machine.config ApplicationHost.config Root level Web.config Application level Web.config Virtual or physical directory level Web.config |
Requirements |
Microsoft Internet Information Services (IIS) version 7.0 |