S
Senthil
Con is the file name for a reserved device name(i think
it is for console). So you cannot create a file with
name 'con'. choose some other name
senthil
it is for console). So you cannot create a file with
name 'con'. choose some other name
senthil
folder "c:\inetpub\wwwroot\EMRWeb\Patient_Files" and the-----Original Message-----
Hi everyone, I am having a problem with creating directories using the
Directory classes static member function CreateDirectory.
Here is the following code that I am trying to run that is causing the
problem.
string patient_path = @"c:\inetpub\wwwroot\EMRWeb\Patient_Files\3040"
Directory.CreateDirectory(patient_path);
Directory.CreateDirectory(patient_path + @"\RAD");
Directory.CreateDirectory(patient_path + @"\MISC");
Directory.CreateDirectory(patient_path + @"\LAB");
Directory.CreateDirectory(patient_path + @"\CON");
when the following code runs, the last line always gives the following
error:
"could not find a part of the path c:\"
The other CreateDirectory calls create the directories properly, so it must
be something with the name of the path
"c:\inetpub\wwwroot\EMRWeb\Patient_Files\3040\CON"
I have also tried usually the following substitue code to the same thing but
it also gives a error when creating the CON subfolder:
DirectoryInfo dir = new DirectoryInfo(patient_path);
dir.Create();
dir.CreateSubdirectory("RAD");
dir.CreateSubdirectory("MISC");
dir.CreateSubdirectory("LAB");
dir.CreateSubdirectory("CON");
I don't think it is a problem with permissions because the other directories
are created properly, but these are the security and permission settings.
The identity of the asp.net application is running under the default ASPNET
user account created by .NET framework. The ASPNET account has full
controll access