Configures settings for returning to a well-known configuration state.
<configHistory enabled="true|false" maxHistories="integer" path="string" period="hh:mm:ss"> </configHistory>
The following sections describe attributes, child elements, and parent elements for this section.
Attribute
Description
enabled
Optional Boolean attribute.
Specifies whether the configuration history feature is enabled or disabled. If this attribute is true, the ApplicationHost Helper Service checks for changes in the ApplicationHost.config file by using the time interval specified by the period attribute. If the configuration changes and is still valid, the helper service saves the ApplicationHost.config file in a versioned subdirectory inside the directory specified by the path attribute.
The default value is true.
maxHistories
Optional int attribute.
Specifies the maximum number of history directories to store. The history directory with the lowest version number will be deleted if the maximum is reached.
The default value is 10.
path
Optional string attribute.
Specifies the path of the directory that contains the configuration history subdirectories..
The default value is %SYSTEMDRIVE%\inetpub\history.
period
Optional timeSpan attribute.
Specifies the interval at which the ApplicationHost Helper Service checks for changes in the ApplicationHost.config file. If the configuration changes and is still valid, the helper service saves the files in the directory specified by the path attribute.
The default value is 00:02:00 (2 minutes).
None.
Element
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.
The configuration history feature enables you to go back to a former configuration state if you no longer want the current state.
The ApplicationHost Helper Service enables the configuration history functionality by saving the ApplicationHost.config file to separate configuration history subdirectories at set intervals specified by the period attribute. The subdirectories reside in the directory specified by the path attribute.
If you make a mistake when you modify the ApplicationHost.config file, you can restore an earlier version of the file from a configuration history subdirectory by copying the earlier version into the %windir%\system32\inetsrv\config directory.
The configuration history files do not require separate access control list (ACL) configuration. They inherit their ACL values from the parent directory, to which only administrators have access.
The configuration history feature depends on the ApplicationHost Helper Service. The ApplicationHost Helper Service is a runtime-independent service that does not require the Windows Process Activation Service (WAS) or the World Wide Web Publishing Service (WWW service) to operate. It does not depend on any other service and its startup type is Automatic.
If the ApplicationHost Helper Service is stopped, the configuration history feature will not work.
The following code example sets the maximum number of configuration history subdirectories to 20 and specifies that the ApplicationHost Helper Service check for changes every 4 minutes in the ApplicationHost.config file.
<configuration> <system.applicationHost> <configHistory maxHistories="20" period="00:04:00" /> </system.applicationHost> </configuration>
Configuration locations
Machine.config
ApplicationHost.config
Requirements
Microsoft Internet Information Services (IIS) version 7.0