By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,932 Members | 1,474 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,932 IT Pros & Developers. It's quick & easy.

Please help - weird problem

P: n/a
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?

Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Yoni,

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

Eliyahu

"???? ???????" <@discussions.microsoft.com> wrote in message
news:B9**********************************@microsof t.com...
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?

Nov 19 '05 #2

P: n/a
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?

"Eliyahu Goldin" wrote:
Yoni,

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

Eliyahu

"???? ???????" <@discussions.microsoft.com> wrote in message
news:B9**********************************@microsof t.com...
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?


Nov 19 '05 #3

P: n/a
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

"???? ???????" <@discussions.microsoft.com> wrote in message
news:6E**********************************@microsof t.com...
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?

"Eliyahu Goldin" wrote:
Yoni,

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

Eliyahu

"???? ???????" <@discussions.microsoft.com> wrote in message
news:B9**********************************@microsof t.com...
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?


Nov 19 '05 #4

P: n/a
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?

"Eliyahu Goldin" wrote:
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

"???? ???????" <@discussions.microsoft.com> wrote in message
news:6E**********************************@microsof t.com...
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?

"Eliyahu Goldin" wrote:
Yoni,

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

Eliyahu

"???? ???????" <@discussions.microsoft.com> wrote in message
news:B9**********************************@microsof t.com...
> 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?
>


Nov 19 '05 #5

P: n/a
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

"???? ???????" <@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
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?

"Eliyahu Goldin" wrote:
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

"???? ???????" <@discussions.microsoft.com> wrote in message
news:6E**********************************@microsof t.com...
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?

"Eliyahu Goldin" wrote:

> Yoni,
>
> This is a security problem. You need to grant read permission for
> \\premfs16\sites to the ASP.NET user.
>
> Eliyahu
>
> "???? ???????" <@discussions.microsoft.com> wrote in message
> news:B9**********************************@microsof t.com...
> > 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?
> >
>
>
>


Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.