I have a ASP.Net app on my dev laptop XP Pro SP3. I am trying to create a new directory as a child directory of my web app.
When I try to create it I get an error: "Cannot create <path> because a file or directory with the same name already exists.". <path> is the path to the new directory.
In my code I first check to see if the directoy exists and if not then I try to create it (see code below).
I have added ASPNet to the directory security and given it full permission.
Any one have an idea as why I'm not able to create a directory?
if (! Directory.Exists(Path.GetDirectoryName(saveToPath)) )
string saveDir = Path.GetDirectoryName(saveToPath);
DirectoryInfo objDirectoryInfo = Directory.CreateDirectory(saveDir);