Microsoft KB Archive/911714

= Error message after you upgrade an ASP.NET-based application to ASP.NET 2.0: &quot;Server unavailable&quot; =

Article ID: 911714

Article Last Modified on 3/5/2007

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * 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, use the Aspnet_regiis.exe utility together with the -ga switch to configure the custom service account. To do this, use one of the following methods:  At the Microsoft Visual Studio Command Prompt, type the following command:

Aspnet_regiis –ga procuser

 Follow these steps:  At a command prompt, open the following folder:



 Type the following command:

Aspnet_regiis –ga procuser

 

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

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

Note When you are prompted for a virtual directory alias, type. When you are prompted for the path of the directory, set the path of the  folder.</li></ol> </li>  At a command prompt, run the following code to create a process identity user named. net user ProcUser PasswordTest123 /add </li> Grant the  accounts Full access to the %windir%\Microsoft.NET\Framework\FrameworkBuild\Temporary ASP.NET Files folder.</li>  In the Machine.config file, add the following code to enable the worker process to run by using the  account. <system.web> <processModel enable=&quot;true&quot; userName=&quot;LOCALMACHINE\ProcUser&quot; password=&quot;PasswordTest123&quot;/> </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. </li> Grant Impersonate permissions to the  account. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> Click Start, point to Programs, point to Administrative Tools, and then click Domain Controller Security Policy.</li> Click Security Settings.</li> Click Local Policies, and then click User Rights Assignment.</li> <li>In the right pane, double-click Impersonate a client after authentication.</li> <li>In the Impersonate a client after authentication Properties dialog box, click Add User or Group.</li> <li>In the Select Users, Computers, or Groups dialog box, locate and then click the  account name, and then click OK.</li> <li>Click OK two times.</li> <li> 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. </li></ol> </li> <li>At a command prompt, type iisreset .</li> <li>To request the hello world page, type http://localhost/MyWebApp/ .aspx in the browser.

You receive error message that is mentioned in the &quot;Symptoms&quot; section.</li></ol>

Keywords: kbtshoot kbprb KB911714

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.