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.
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.
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:
Note In this procedure, myfolder is a placeholder for the folder that you created in step 1.
In the myfolder folder, create
a file that is named Test.aspx and that contains the following
code.
<%="hello"%>
Create an IIS
application that is named MyWebApp, and then map the Web
application to the myfolder folder. To do this, follow these steps:
Click Start, click
Run, type inetmgr.exe, and then click
OK.
Expand ServerName, and then
expand Web Sites.
Right-click Default Web Site, click
New, and then click Virtual
Directory.
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.
At a command prompt, run the following code to create a
process identity user named ProcUser.
net user ProcUser PasswordTest123 /add
Grant the ProcUser accounts Full
access to the %windir%\Microsoft.NET\Framework\FrameworkBuild\Temporary ASP.NET Files folder.
In the Machine.config file, add the following code to enable
the worker process to run by using the ProcUser account.