RE: CreateDirectory() - Could not find a part of the path "D:\".
- From: v-schang@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Wed, 06 Apr 2005 05:11:58 GMT
Hi Clinton,
Welcome to ASP.NET newsgroup.
>From your description, when you're using Directory.CreateDirectory to
create sub dirs through the path retrieved by the Server.MapPath("") , you
got
========
System.IO.DirectoryNotFoundException error: Could not find a part of the
path "D:\".
========
error. Also, you're suffering the problem on many other machines with the
same environement, yes?
Based on my loal test and the code sinppet, the problem is likely caused by
something with your environment. Would you help me confirm the following
things:
1. Does the problem occurs if you directly pass the full physical Path of
your application's virtual dir to the CreateDirectory function?
2. If still occurs, we may do some check on permission. How about turn off
impersonate and use the default process identity(should be machine\aspnet
for win2k server) and grant "modify/write" permission to that account. Test
again to see whether that can work. ( You can also test creating directory
through passing full qualified path when you swtich the process identity
and turn off impersonate).
BTW, to get the physical path of the root dir of our ASP.NET application,
we can use the
Server.MapPath("~/"), this will be better than using the empty string which
only retrieve the relative path the current directory.
Please feel free to let me know if you got any new findings or need any
further help. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
.
- Follow-Ups:
- RE: CreateDirectory() - Could not find a part of the path "D:\".
- From: Clinton Frankland
- RE: CreateDirectory() - Could not find a part of the path "D:\".
- References:
- CreateDirectory() - Could not find a part of the path "D:\".
- From: Clinton Frankland
- CreateDirectory() - Could not find a part of the path "D:\".
- Prev by Date: Re: Dll files instead of my asp.net pages
- Next by Date: Re: The Demise of the Art of Programming
- Previous by thread: CreateDirectory() - Could not find a part of the path "D:\".
- Next by thread: RE: CreateDirectory() - Could not find a part of the path "D:\".
- Index(es):
Relevant Pages
|