Please help - weird problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
While trying to create new directory i recieve the following error
message:
"System.IO.DirectoryNotFoundException: Could not find a part of the path
"\\premfs16\sites".
The path exists, even when i check the path
with the code: Directory.Exists(...) the result is true.

Here is the code:
http://www.adeo.co.il/test.aspx

Notice that in the line before the code throws exception
i create new file to the same path and no error
occurs - only when trying to create directory
the error appears.

Any idea?
 
Yoni,

This is a security problem. You need to grant read permission for
\\premfs16\sites to the ASP.NET user.

Eliyahu
 
So how do you explain that the code succeeded creating
a file (which needs to read the same path...) and only
creating a directory failed?
 
Yoni,

Probably file creating doesn't require read permission but directory
creating does. I don't know exactly how all these permissions work.

Security and permission setting is a complicated matter. You don't really
need to understand fully the theoretical background. For your immediate
problem it's enough to know how other people solved the same problem. If you
wish to investigate - you are welcome to invest your time in that.

Eliyahu
 
The problem is much more sophisticated.
My web site host at shared hosting company.
No hosting company will allow users to have read
permissions on their root directory.
So what you are actually saying is that you can not
open directories on web sites which hosts on shared servers.
Is that correct?
 
Well, I don't think you need read permissions for the root directory, only
for those under yours. Speak to your host and ask again on security
newsgroups.

Good luck,

Eliyahu
 
Back
Top