An IIS 6.0 application pool may unexpectedly exit when an worker process shuts down or is recycled (918041)



The information in this article applies to:

  • Microsoft Internet Information Services version 6.0
  • Microsoft ASP.NET 2.0

SYMPTOMS

Consider the following scenario. You set up a Microsoft Internet Information Services (IIS) 6.0 application pool. The application pool contains a Microsoft ASP.NET 2.0 application. A worker process in the application pool shuts down or is recycled. In this scenario, the application pool may unexpectedly exit.

CAUSE

This problem occurs because a worker process in an application pool does not have sufficient permissions to access and write to the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<ASP.NETVersion>\Names

Note <ASP.NETVersion> represents the version of ASP.NET that is installed.

WORKAROUND

To work around this problem, use one of the following methods.

Method 1: Add the NETWORK SERVICE user account to the IIS_WPG group

You can add the NETWORK SERVICE user account to the IIS_WPG group. To do this, follow these steps:

Note This workaround only works on computers that are not domain controllers. If your computer is a domain controller, use the second workaround instead.
  1. Click Start, right-click My Computer, and then click Manage.
  2. Expand Local Users and Groups, and then click Groups.
  3. In the Name column, right-click IIS_WPG, and then click Properties.
  4. Click Add.
  5. In the Select Users dialog box, click Advanced.
  6. Click Find Now.
  7. In the search results pane, click NETWORK SERVICE, and then click OK.
  8. Click OK to add the NETWORK SERVICE account to the IIS_WPG group.

Method 2: Add a user account to the IIS_WPG group and to the application pool identity

You can add a new or an existing user account to the IIS_WPG group and the application pool identity. To do this, follow these steps:

Note Use this method if your computer is a domain controller.
  1. Click Start, click Run, type dsa.msc, and then click OK. The Active Directory Users and Computers window appears.
  2. Expand the computer name.
  3. Click Users, right-click the account that you want to add to the IIS_WPG group, and then click Properties.
  4. Click the Member Of tab.
  5. Click Add.
  6. On the Select Groups dialog box, click Advanced.
  7. Click Find Now.
  8. In the search results pane, click IIS_WPG, and then click OK.
  9. Click OK to add the account to the IIS_WPG group.
  10. Click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
  11. Expand the computer name, expand Application Pools, right-click the name of the application pool that you want to modify, and then click Properties.
  12. Click the Identity tab.
  13. Click Configurable.
  14. Type the account user name, or click Browse to locate the account.
  15. Type the account password, and then click OK.
  16. Retype the password to confirm, and then click OK.

Method 3: Grant NETWORK SERVICE the necessary permissions to access the ASP.NET registry key

Note Use this method if you are running ASP.NET on a domain controller. An advantage of this is that you do not have to create an additional domain user account that you have to maintain or retain the password for. However, if you reinstall ASP.NET by using aspnet_regiis or the ASP.NET performance counters, the permissions on the registry key may be reset.

To grant NETWORK SERVICE the necessary permissions to access the ASP.NET registry key, follow these steps:
  1. Start Registry Editor, and then locate the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP.NET_2.0.50727\Names registry key.
  2. Right-click Names, and then click Permissions.
  3. Click Add, type NETWORK SERVICE, click Check Names, and then click OK.
  4. In the Groups or User Names list, click Advanced.
  5. In the Advanced Security Settings for Names dialog box, click the Permissions tab, click NETWORK SERVICE, and then click Edit.
  6. In the Permission Entry for Names dialog box, make sure that NETWORK SERVICE appears in the Name box.
  7. Click to select the following check boxes:
    • Query Value
    • Set Value
    • Create Subkey
    • Enumerate Subkeys
    • Notify
    • Read Control
  8. Click OK in all the dialog boxes, and then close Registry Editor.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about how to configure the application pool identity in IIS 6.0, visit the following Microsoft Web site: For more information about the NETWORK SERVICE account, the IIS_WPG group, and other IIS 6.0 built-in accounts, visit the following Microsoft Web site:

Modification Type:MinorLast Reviewed:6/14/2006
Keywords:kbtshoot kbprb KB918041 kbAudDeveloper