Access to the path "..." is denied

W

William Tasso

Greetings one and all.

I have what is probably a server configuration (maybe permissions) issue.
I hope this is a suitable group for such a query - if not, I'd be grateful
for directions to a more suitable group.

Server is WS3/IIS6

Error returned is:

.. Server Error in '/' Application.
.. ----------------------------------------------
.. Access to the path "\tester6" is denied. ...

Please let me know if more information would be useful.

The site is configured for write access in IIS.

I have trawled the web and the usenet archives with the result that every
likely looking username now has 'Full Control' on the web root (and child
objects) but still the page responds with the error.

Here is the test code:
<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<html>
<head><title>Test</title></head>
<body>
<h1>Hello test</h1>
<% if (!Directory.Exists("\\tester6"))
{
Response.Write("stuff ----");
Response.Flush();
// Create the directory it does not exist.
Directory.CreateDirectory("\\tester6");
}
%>
</body>
</html>

As you can see - this is a trivial test page, but still stubbornly refuses
to to produce more than the error above.

oh yes - one more thing. I know ASP.NET is working in general as we have
the SqlAdmin application installed and working on that server.

Thanks for reading.
 
W

William Tasso

William Tasso said:
...
Error returned is:

. Server Error in '/' Application.
. ----------------------------------------------
. Access to the path "\tester6" is denied. ...
...
Directory.CreateDirectory("\\tester6");

No worries - cracked it now ;)

Thanks for reading anyhow.
 
W

William Tasso

Juan T. Llibre said:
Please post your solution,

Certainly - although I'm not too sure if I'd recommend it.

applied impersonation and gave iusr_<machine> list-contents rights

A better solution would be to find a way to give the app what it needs
without impersonation. Know one? perhaps a list of required permissions?
 
W

William Tasso

William Tasso said:
...
A better solution would be to find a way to give the app what it needs
without impersonation. Know one? perhaps a list of required
permissions?

For example, this page:
http://msdn.microsoft.com/library/d...n-us/vsent7/html/vxconapplicationidentity.asp

suggests:

Read/write access is required for:
o The %installroot%\ASP.NET Temporary Files directory. Subdirectories
beneath this root are used for dynamically compiled output.
o The %temp% directory, which is used by the compilers during dynamic
compilation.

Read access is required for:
o The application directory.
o The %installroot% hierarchy to make it possible to access to system
assemblies.
o The Web site root directory (e.g., the path at which the "Default Web
Site" points, typically %systemdrive%\inetpub\wwwroot).
o The Global Assembly Cache, %windir%\assembly.


How do I do that? For example: \assembly doesn't appear to have settable
security and I've no idea where %temp% is in the context of user: aspnet
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top