Server cannot access application directory

G

Guest

Hi,

I'm trying to setup a web server to host asp.net 1.1... but keep getting the
following error message:

Hopefully someone can give me some ideas on what I may need to do.

Thanks in advance - Grant.

Server Error in '/infosys226' Application
--------------------------------------------------------------------------------

Server cannot access application directory 'D:\inetpub\online\infosys226\'.
The directory does not exist or is not accessible because of security
settings.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Web.HttpException: Server cannot access
application directory 'D:\inetpub\online\infosys226\'. The directory does not
exist or is not accessible because of security settings.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Server cannot access application directory
'D:\inetpub\online\infosys226\'. The directory does not exist or is not
accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +263

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

Brock Allen

The answer is in the error -- the NT filesystem security is preventing the
application hosting ASP.NET from reading the ASP.NET pages. If you're running
under W2K then the DACLs need to allow the local ASPNET account read access.
If it's W2K3 then it's the Network Service account that requires read access.
 
J

James Steele

Hello Grant,

Have you tried or verified that the ASP.NET account on the particular
website/virtual directory/virtual root has read, execute and list access?

If not you may want to give that a try. It helped me.

Have a look at the following KB article.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;316721

You can do this by checking the ASPNET account properties in Local Users and
Groups.

Good luck!

____________________
James Steele
Senior .NET Consultant
(e-mail address removed)
http://weblogs.asp.net/jamessteele

Grant said:
Hi,

I'm trying to setup a web server to host asp.net 1.1... but keep getting
the
following error message:

Hopefully someone can give me some ideas on what I may need to do.

Thanks in advance - Grant.

Server Error in '/infosys226' Application.
--------------------------------------------------------------------------------

Server cannot access application directory
'D:\inetpub\online\infosys226\'.
The directory does not exist or is not accessible because of security
settings.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

Exception Details: System.Web.HttpException: Server cannot access
application directory 'D:\inetpub\online\infosys226\'. The directory does
not
exist or is not accessible because of security settings.

Source Error:

An unhandled exception was generated during the execution of the current
web
request. Information regarding the origin and location of the exception
can
be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Server cannot access application directory
'D:\inetpub\online\infosys226\'. The directory does not exist or is not
accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +263

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

Guest

Hi Brock,

Thanks - we hadn't set the Network Service account at the root level -
working now.

Cheers,

Grant.

Brock Allen said:
The answer is in the error -- the NT filesystem security is preventing the
application hosting ASP.NET from reading the ASP.NET pages. If you're running
under W2K then the DACLs need to allow the local ASPNET account read access.
If it's W2K3 then it's the Network Service account that requires read access.




Hi,

I'm trying to setup a web server to host asp.net 1.1... but keep
getting the following error message:

Hopefully someone can give me some ideas on what I may need to do.

Thanks in advance - Grant.

Server Error in '/infosys226' Application.
----------------------------------------------------------------------
----------
Server cannot access application directory
'D:\inetpub\online\infosys226\'. The directory does not exist or is
not accessible because of security settings. Description: An unhandled
exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and
where it originated in the code.

Exception Details: System.Web.HttpException: Server cannot access
application directory 'D:\inetpub\online\infosys226\'. The directory
does not exist or is not accessible because of security settings.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Server cannot access application
directory
'D:\inetpub\online\infosys226\'. The directory does not exist or is
not
accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +263
[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +982
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
+128
 
G

Guest

Hi James,

thanks for your reply. We had set to read, ex, list already but still wasn't
working...

Brocks suggestion of the Network Service account requiring read access was
the solution. We hadn't set it to the root level - all working now.

Thanks again,

Grant.

James Steele said:
Hello Grant,

Have you tried or verified that the ASP.NET account on the particular
website/virtual directory/virtual root has read, execute and list access?

If not you may want to give that a try. It helped me.

Have a look at the following KB article.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;316721

You can do this by checking the ASPNET account properties in Local Users and
Groups.

Good luck!

____________________
James Steele
Senior .NET Consultant
(e-mail address removed)
http://weblogs.asp.net/jamessteele

Grant said:
Hi,

I'm trying to setup a web server to host asp.net 1.1... but keep getting
the
following error message:

Hopefully someone can give me some ideas on what I may need to do.

Thanks in advance - Grant.

Server Error in '/infosys226' Application.
--------------------------------------------------------------------------------

Server cannot access application directory
'D:\inetpub\online\infosys226\'.
The directory does not exist or is not accessible because of security
settings.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

Exception Details: System.Web.HttpException: Server cannot access
application directory 'D:\inetpub\online\infosys226\'. The directory does
not
exist or is not accessible because of security settings.

Source Error:

An unhandled exception was generated during the execution of the current
web
request. Information regarding the origin and location of the exception
can
be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Server cannot access application directory
'D:\inetpub\online\infosys226\'. The directory does not exist or is not
accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +263

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

Patrick Olurotimi Ige

Brock
So does W2K3 uses Network Service account and not ASPNET acct anymore.
 
B

Brock Allen

Correct, as long as you don't revert to IIS5 mode on W2K3 (and normally you
wouldn't). This is configurable, BTW, via the IIS manager MMC. If you find
the AppPool that your application is configured/hosted in you can get the
properties and choose the Identity tab to specify a different account (if
necessary).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top