Clients receive a "service unavailable" error message in their Web browsers when you run many application pools under separate identities in IIS

Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows registry


When you run multiple application pools under different custom identities in Microsoft Internet Information Services (IIS), some worker processes may not initialize correctly. When this issue occurs, clients may receive a "service unavailable" error message when they try to visit Web pages that those application pools host. Additionally, the following warning message may be logged in the system log:

This issue does not occur when you use the three predefined identities. The predefined identities are Network Service, Local Service, and Local System.

Note This issue occurs in both the 32-bit version of IIS and the 64-bit version of IIS.


Together with each worker process that IIS creates under a separate identity, the system creates a new desktop object by allocating memory from the configured desktop heap. This issue occurs because, when that heap has been exhausted, IIS cannot create more worker processes. Clients then receive the "service unavailable" error message in their Web browsers when they try to visit Web sites that those application pools host.


Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To resolve this issue, add the UseSharedWPDesktop registry key to your computer that is running IIS. This registry key permits all worker processes to run in one shared desktop, regardless of their worker process identities.

To add the UseSharedWPDesktop registry key:
  1. Click Start, click Run, type regedit, and then click OK.
  2. For IIS6, locate the following registry key:
    For IIS7, locate the following registry key:
    For more information about IIS 7 registry locations, visit the following Microsoft Web site:
  3. Right-click Parameters, point to New, and then click
    DWORD Value.
  4. Type UseSharedWPDesktop.
  5. Set the value for this new key to 1.
  6. Quit Registry Editor, and then restart IIS.


This behavior is by design.

ID do Artigo: 831135 - Última Revisão: 8 de fev de 2009 - Revisão: 1