Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Server cannot access application directory


Message #1 by "Clint Stearns" <clint@u...> on Tue, 19 Mar 2002 17:40:21
I have created an asp.net application and successfully installed it on two 
test servers - my development machine which is XP and a test bed server 
which is .NET Server Beta 3.  When I installed it on the production 
machine - a 2k box with the .Net framwork installed it no longer runs.  I 
receive the following error message:
HttpException (0x80004005): Server cannot access application 
directory '<directory here>'. The directory does not exist or is not 
accessible because of security settings.]
   System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +256

[HttpException (0x80004005): ASP.NET Initialization Error]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +927
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +128


The application is set up in as an IIS virtual directory.  The web server 
on the production machine is not configured to use the IUSER_machine name 
user as the anonymous web user, however.  It is set to use another local 
user on the machine.  I've tried giving that user all the permissions I 
can in the application directory.  Nothing works.  Any help would 
appreciated.  Thank you in advance.
Message #2 by Clint Stearns <clint@u...> on Tue, 19 Mar 2002 11:44:41 -0600
have created an asp.net application and successfully installed it on two
test servers - my development machine which is XP and a test bed server
which is .NET Server Beta 3. When I installed it on the production
machine - a 2k box with the .Net framwork installed it no longer runs. I
receive the following error message:
HttpException (0x80004005): Server cannot access application
directory '<directory here>'. The directory does not exist or is not
accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +256
[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +927
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +128

The application is set up in as an IIS virtual directory. The web server
on the production machine is not configured to use the IUSER_machine name
user as the anonymous web user, however. It is set to use another local
user on the machine. I've tried giving that user all the permissions I
can in the application directory. Nothing works. Any help would
appreciated. Thank you in advance.


Clint Stearns
Research Programmer
clint@u...

Message #3 by "Robert Colbert" <rcolbert@n...> on Wed, 20 Mar 2002 16:37:00
This error actually has nothing to do w/ IIS.  The problem is that 
the .NET worker process doesn't have permission to access that 
directory.  When you install the .NET Framework, it creates a local user 
account (if not on a DC) named ASPNET.  This account must have at least 
read/execute rights on any application directory.  Otherwise it can't 
access the application.  Give that account permissions and your problem 
should be solved.

This most noticeably occurs on production machines that have been locked 
down w/ the IIS Lockdown tool since it removes all "extraneous" 
permissions from the web content folders and it was released prior to the 
final .NET Framework.  Hopefully MS will release a new version w/ ASP.NET 
as one of the permission templates.

Hope this helps,
Robert Colbert



> receive the following error message:
> HttpException (0x80004005): Server cannot access application 
> directory '<directory here>'. The directory does not exist or is not 
> accessible because of security settings.]
>   System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
>   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +256

> [HttpException (0x80004005): ASP.NET Initialization Error]
>   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +927
>   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) 
+128

  Return to Index