Event ID 9009 — IIS Application Host History Configuration
Applies To: Windows Server 2008 R2
The ApplicationHost Helper Service (AppHostSvc) maintains a history of Internet Information Services (IIS) configuration by saving the ApplicationHost.config file to separate configuration history subdirectories. 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. You can specify the frequency with which AppHostSvc checks for configuration changes, the path of the directory that contains the subdirectories, and how many subdirectories to keep.
By default, the Application Host Helper Service checks for changes in the ApplicationHost.config file every two minutes. If it detects that the configuration has changed, it creates a backup. The default location for the configuration history files is %SystemDrive%\inetpub\history. AppHostSvc creates one subdirectory under this directory for each configuration file backup. By default, the maximum number of history subdirectories is 10. If the number of configuration history subdirectories reaches the maximum specified, the oldest subdirectory is deleted.
AppHostSvc is a runtime-independent service that does not require the Windows Process Activation Service (WAS) or the World Wide Web Publishing Service (W3SVC) to operate. AppHostSvc 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.
Event Details
Product: | Internet Information Services |
ID: | 9009 |
Source: | Microsoft-Windows-IIS-APPHOSTSVC |
Version: | 7.5 |
Symbolic Name: | APPHOSTSVC_HISTORY_CANT_DELETE_DIRECTORY_WARNING |
Message: | The Application Host Helper Service encountered an error trying to delete the history directory '%1'. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number. |
Resolve
Stop and restart AppHostSvc
If the Application Host Helper Service (AppHostSvc) cannot delete a history directory, it will try to do so the next time that the service starts. Normally you do not have to take any action when this occurs. However, if the problem persists, you can stop and restart the service manually.
To perform this procedure, you must have membership in Administrators, or you must have been delegated the appropriate authority.
To stop and restart the Application Host Helper Service:
- Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
- At the command prompt, type net stop apphostsvc.
- At the command prompt, type net start apphostsvc.
Verify
To verify the configuration of the AppHostSvc configuration history backup feature, you can do the following:
- Use notepad to examine the current configHistory section settings in the ApplicationHost.config file.
- Use the Appcmd.exe command-line administration utility to view the configHistory section in the ApplicationHost.config file.
To perform these procedures, you must have membership in Administrators, or you must have been delegated the appropriate authority.
View the configHistory section by using notepad
To view the configHistory section by using notepad:
Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
Type cd %Windir%\system32\inetsrv\config.
Type notepad ApplicationHost.config.
In notepad, search for the configHistory section under system.applicationHost. The contents should resemble the following:
<system.applicationHost>
<configHistory enabled="true" path="%SystemDrive%\inetpub\history" maxHistories="10" period="00:02:00" />
</system.applicationHost>
View the configHistory section by using Appcmd.exe
To view the configHistory section by using Appcmd.exe:
- Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
- Type cd %Windir%\system32\inetsrv.
- Type appcmd list config "Default Web Site" /section:configHistory /config:*. (This example uses the default Web site; replace the site name as necessary.)
See Also
IIS 7.0: configHistory Element (IIS Settings Schema)