Error message after you upgrade an ASP.NET-based application to ASP.NET 2.0: "Server unavailable" (911714)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Standard Edition


SYMPTOMS

Consider the following scenario. You upgrade a Microsoft ASP.NET-based application to ASP.NET 2.0. You then try to run the application. In this scenario, you may receive the following error message:
Server Unavailable
Additionally, the following error message may be written to the Event Viewer application log: Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied. For more information, see Help and Support Center at http://support.microsoft.com.

CAUSE

This problem can occur when ASP.NET 2.0 is running under a custom service account. The custom service account does not have access permissions to the Microsoft Internet Information Services (IIS) metabase and other directories that are used by ASP.NET.

RESOLUTION

To resolve this problem, configure the custom service account by using the Aspnet_regiis.exe utility. At a command prompt, run the Aspnet_regiis.exe utility by using the -ga switch:

Aspnet_regiis -ga procuser

STATUS

This behavior is by design.

MORE INFORMATION

Steps to reproduce this problem

  1. In Windows Explorer, create a new folder.
  2. In the myfolder folder, create a file that is named Web.config and that contains the following code.
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <system.web>
      </system.web>
    </configuration>
    Note In this procedure, myfolder is a placeholder for the folder that you created in step 1.
  3. In the myfolder folder, create a file that is named Test.aspx and that contains the following code.
    <%="hello"%>
  4. Create an IIS application that is named MyWebApp, and then map the Web application to the myfolder folder. To do this, follow these steps:
    1. Click Start, click Run, type inetmgr.exe, and then click OK.
    2. Expand ServerName, and then expand Web Sites.
    3. Right-click Default Web Site, click New, and then click Virtual Directory.
    4. Use the Virtual Directory Creation Wizard to create a Web virtual directory.

      Note When you are prompted for a virtual directory alias, type MyWebSite. When you are prompted for the path of the directory, set the path of the myfolder folder.
  5. At a command prompt, run the following code to create a process identity user named ProcUser.
    net user ProcUser PasswordTest123 /add
    
  6. Grant the ProcUser accounts Full access to the %windir%\Microsoft.NET\Framework\FrameworkBuild\Temporary ASP.NET Files folder.
  7. In the Machine.config file, add the following code to enable the worker process to run by using the ProcUser account.
    <system.web>
        <processModel enable="true"
                      userName="LOCALMACHINE\ProcUser"
                      password="PasswordTest123"/>
    </system.web> 
    Note If you change the process account in the Machine.config file, you must reset IIS or stop the aspnet_wp.exe process.
  8. Grant Impersonate permissions to the ProcUser account. To do this, follow these steps:
    1. Click Start, point to Programs, point to Administrative Tools, and then click Domain Controller Security Policy.
    2. Click Security Settings.
    3. Click Local Policies, and then click User Rights Assignment.
    4. In the right pane, double-click Impersonate a client after authentication.
    5. In the Impersonate a client after authentication Properties dialog box, click Add User or Group.
    6. In the Select Users, Computers, or Groups dialog box, locate and then click the ProcUser account name, and then click OK.
    7. Click OK two times.
    8. To enforce an update of the computer policy, type the following command.
      secedit /refreshpolicy machine_policy /enforce 
      Note On a Microsoft Windows XP-based computer or on a Windows Server 2003-based computer, use the gpupdate /enforce command.
  9. At a command prompt, type iisreset.
  10. To request the hello world page, type http://localhost/MyWebApp/Test.aspx in the browser.

    You receive error message that is mentioned in the "Symptoms" section.

Modification Type:MajorLast Reviewed:9/22/2006
Keywords:kbtshoot kbprb KB911714 kbAudDeveloper kbAudITPRO