Partager via


Event ID 5189 — IIS Application Host Helper Service Availability

Applies To: Windows Server 2008 R2

The Internet Information Services (IIS) Application Host Helper Service requires access to a directory in which it can store temporary configuration files that it creates at run-time for application pools. The directory must be available to WAS and cannot be on a UNC path. If these conditions are not met, the Application Host Helper Service SID mapping functionality may be unavailable.

Event Details

Product: Internet Information Services
ID: 5189
Source: Microsoft-Windows-WAS
Version: 7.5
Symbolic Name: WAS_ISOLATION_FILE_GEN_ERROR
Message: The Windows Process Activation Service failed to generate an application pool config file for application pool '%1'. The error type is '%2'. To resolve this issue, please ensure that the ApplicationHost.config file is correct and recommit the last configuration changes made. The data field contains the error number.

Resolve

Check configuration integrity

After you make changes to the ApplicationHost.config file, you can verify its integrity by testing it with Appcmd.exe (see Section I). If the test fails, note the error, then backup the ApplicationHost.config file (Section II) and change the ApplicationHost.config file (Section III) based on the error you noted in Section I.

To perform these procedures, you must have membership in Administrators, or you must have been delegated the appropriate authority.

I. Test ApplicationHost.config by using Appcmd.exe

  1. Open an elevated command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
  2. At the command prompt, type cd %Windir%\system32\inetsrv.
  3. At the command prompt, type appcmd list config. The command should either return an error or successfully display the entire ApplicationHost.config file.
  4. If there are no errors, the XML and configuration in the file are valid; you may stop here.
  5. If the XML in the file is malformed, note the line number. If the configuration is invalid, note the property name. Continue on to the following steps.

II. Back up the ApplicationHost.config file

  1. Open an elevated command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

  2. At the command prompt, type cd %Windir%\system32\inetsrv.

  3. Type appcmd add backup backupName to back up the ApplicationHost.config file.

    A directory with the backup name that you specify will be created under the %Windir%\system32\inetsrv\backup directory. If you do not specify a name, appcmd will generate a directory name automatically using the current date and time.

III. Make required changes to ApplicationHost.config

  1. At the elevated command prompt, type cd config.
  2. Type notepad ApplicationHost.config.
  3. Following the results of step 5 in Section I, make the necessary changes to ApplicationHost.config.
  4. Save and close ApplicationHost.config.
  5. Test the ApplicationHost.config file again by using Appcmd.exe.
  6. Repeat the previous steps until the appcmd list config command returns no errors.

Verify

To verify that the Application Host Helper Service is running correctly, you can do the following:

  • Use the command line to verify that the service is running (see Section I).
  • Make a token change in the ApplicationHost.config file, then check the configuration history directory to verify that a configuration backup was made (see Section II).

To perform these procedures, you must have membership in Administrators, or you must have been delegated the appropriate authority.

I. Use the command line to verify that AppHostSvc is running

  1. Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
  2. Type sc query apphostsvc, and press ENTER. The Application Host Helper service is running if the state reported for the service is 4 RUNNING.

II. Verify that configuration backups are being created

A.  Make a token change in ApplicationHost.config.

  1. Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
  2. Type cd %Windir%\system32\inetsrv\config.
  3. Type notepad ApplicationHost.config.
  4. On the second line of the file, after the beginning "<!- -" comment mark, add some text such as "Configuration History Test".
  5. Save the file and note the time of the change. Because you have added a comment to the configuration file, AppHostSvc will detect the change and make a backup, even though no change to configuration itself has been made.
  6. Close notepad.

B.  Check to see whether a configuration backup was made.

By default, the location for the configuration history files is %SystemDrive%\inetpub\history. AppHostSvc creates one subdirectory under this directory for each configuration file backup. The configuration history subdirectories are named in the format CFGHISTORY_serialnumber, where serialnumber is a 10-digit sequential number (zero padded).

  1. At the elevated command prompt, type cd %SystemDrive%\inetpub\history.
  2. Type dir. A list of the configuration history subdirectories appears.
  3. Note the date and time of the most recent CFGHISTORY directory. By default, AppHostSvc checks for changes in the configuration files every 2 minutes. If you have not changed the value of the configHistory period attribute, a new CFGHISTORY directory should appear within 2 minutes of the time that you noted in part A.
  4. Type cd CFGHISTORY_serialnumber  to open the new directory.
  5. Check the date and time of the ApplicationHost.config file inside the CFGHISTORY directory. The file timestamp should be within 2 minutes of the time that you noted in part A above.

IIS Application Host Helper Service Availability

Internet Information Services (IIS) 7.5