Introduction
In IIS 6.0, administrators had a safety net that
allowed them to easily ascertain what changed in IIS's configuration. It was
implemented as a history file that could be restored easily as well serving as a
usable history of events that happened to your configuration. In case anything
went wrong during application installs, upgrades, or individual changes to the
metabase, you can restore to a working state.
With IIS7's brand new configuration, we wanted the
same "safety net" yet we couldn't use the IIS 6.0 history feature because of
changes in our configuration architecture. In IIS 7.0 we have resolved this
problem by creating a service that monitors for changes to the master
configuration file, ApplicationHost.config, and will periodically create
snapshots for you to later retrieve if necessary.
This feature is called IIS7's Configuration History.
In this walkthrough, we will illustrate how this feature works.
Tasks in this walkthrough
- Reviewing configHistory default configuration
settings
- Validating configHistory functionality is working
properly
- Modifying the number of configuration directories
(maxHistories) retained and period attributes
- Changing the default path for configHistory
- Restoring configuration from a backup file
Task 1: Reviewing configHistory default
configuration settings
In this task, you will review the configuration
options available after a default IIS7 installation. In later tasks, you will
later modify some of these settings to show the flexibility of this feature to
fit your environment.
Step 1: Open applicationHost.config
-
Click
Start, click Run, and in the
Open:
dialog box type notepad and
Click OK
Figure 1: Opening
Configuration with Notepad
- Click File, then open, and in the File name:
dialog box type %windir%\system32\inetsrv\config\applicationHost.config
and Click Open

Figure 2:
ApplicationHost.config Path
- To locate configHistory section, click CTRL-F and enter
configHistory and Click Find Next
After opening the master file, you should see an entry like the following for
configHistory:
<sectionGroup name"system.applicationHost>
<section name="applictionPools" allowDefinition="AppHostOnly" overrideMode="Deny" />
<section name="configHistory" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
<section name="customMetadata" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
<section name="listenerAdapters" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
<section name="log" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
<section name="sites" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
<section name="webLimits" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
</sectionGroup>
You will quickly notice that there are no further settings for this feature
in applicationHost.config. This is expected behavior because by default IIS7
uses the values stored in the IIS7 schema. To see the default settings, we will
open IIS7's schema file (IIS_schema.xml.)
Step 2: Locate configHistory defaults in IIS schema
- Click Start, click Run, and in the Open:
dialog box type notepad and Click OK
-
Click File, then open, and in the
File name:
dialog box type %windir%\system32\inetsrv\config\schema\iis_schema.xml
Figure 3: IIS Schema
- To locate configHistory section, click CTRL-F and enter
configHistory
-
On your Windows Server Code Name "Longhorn" server, you should see the
following:
Figure 4: configHistory
Schema Definition
As you can see, there are four configurable settings (attributes) for the
configHistory section:
|
Attribute
|
Default Setting
|
Definition
|
|
enabled
|
True
|
This value indicates whether configuration history is enabled or
disables
|
|
path
|
%systemdrive%\inetpub\history
|
The path where history directories will be created and stored
|
|
maxHistories
|
10
|
The maximum number of directories retained by IIS7
|
|
period
|
00:02:00
|
The time between each check made for changes by
IIS7
|
Summary
This task, albeit simple, shouldn't be overlooked because it offers you
direct insight into configuration attributes available for the configHistory
section. We will later modify these settings as a demonstration of the features
flexibility based on your environment.
Task 2: Validating configHistory functionality is
working properly
The primary learning point in this lab is to see
configHistory in action. Furthermore, for experienced administrators who
understand IIS 6.0's metabase history, this task will aid in learning the
differences between the two features.
Metabase history was a file-based, rather than
directory-based like IIS7's configuration history. For example, all backups in
IIS 6.0 were stored in the same location that wasn't customizable. In IIS7, each
unique copy is stored in its own directory at creation time. In this task, we
will make some changes to IIS7's configuration file using IIS Manager and review
the results of these changes.
Step 1: Create a website
-
Click Start, Run, and type Inetmgr and Click Ok
Figure 5: Opening IIS Manager
- Double-click on your server name, for example
IIs7Server, to expand the navigation tree
-
Right-click on the server, and choose Add Web Siteā¦
Figure 6: Add Web Site
-
In the
Add Web Site wizard, enter information to create a
new Website. For example:
Figure 7: Add Web Site
Wizard
- Click Ok
- You should now see the new Website created in your IIS Manager, as we do in
the following:
Related Content
Comments