Share via


virtualDirectoryDefaults Element for sites (IIS Settings Schema)

Note

For more information about the virtualDirectoryDefaults element, see the following topic on the Microsoft IIS.net Web site: Virtual Directory Defaults for All Sites <virtualDirectoryDefaults>.

Specifies default settings for all virtual directories on the server. If the same attribute or child element is configured in both the virtualDirectoryDefaults section and in the virtualDirectory section for a specific virtual directory, the configuration in the virtualDirectory section is used for that virtual directory.

Syntax

Attributes and Elements

The following sections describe attributes, child elements, and parent elements for this section.

Attributes

Attribute

Description

allowSubDirConfig

Optional Boolean attribute.

Specifies whether IIS looks for Web.config files in content directories lower than the current level (true) or does not look for Web.config files in content directories lower than the current level (false).

The default value is true.

logonMethod

Optional enum attribute.

Specifies the default logon method for all virtual directories on the server.

The logonMethod attribute can be one of the following possible values. The default is ClearText.

ValueDescription
BatchThis logon type is intended for batch servers, where processes may be executing on behalf of a user without their direct intervention. The numeric value is 1.
ClearTextThis logon type preserves the name and password in the authentication package, which allows the server to make connections to other network servers while impersonating the client. The numeric value is 3.
InteractiveThis logon type is intended for users who will be interactively using the computer. The numeric value is 0.
NetworkThis logon type is intended for high performance servers to authenticate plaintext passwords. Credentials are not cached for this logon type. The numeric value is 2.

For more information about these values, see LogonUser on the MSDN site.

password

Optional string attribute.

Specifies the password associated with the user name.

Note

To avoid storing unencrypted password strings in configuration files, always use Appcmd.exe or IIS Manager to enter passwords. If you use these management tools, the password strings will be encrypted automatically before they are written to the XML configuration files. This provides better password security than storing unencrypted passwords.

path

Optional string attribute.

Specifies the default virtual path of all virtual directories on the server.

physicalPath

Optional string attribute.

Specifies the default physical path of all virtual directories on the server.

userName

Optional string attribute.

Specifies the default user name of an account that can access configuration files and content for all virtual directories on the server.

Child Elements

None.

Parent Elements

Element

Description

configuration

Specifies the root element in every configuration file that is used by IIS 7.

system.applicationHost

Specifies the root element for configuring Web process settings.

sites

Specifies configuration settings for all sites on the server, and includes settings for applications and virtual directories in those sites.

Remarks

For more information about the virtualDirectoryDefaults element, see the following topic on the Microsoft IIS.net Web site: Virtual Directory Defaults for All Sites <virtualDirectoryDefaults>.

Element Information

Configuration locations

ApplicationHost.config

Requirements

Microsoft Internet Information Services (IIS) version 7.0