I have a virtual directory setup in IIS6. This maps to a shared network drive.
I can correctly map the path using
string mappedPath = HttpContext.Current.Server.MapPath(path);
I then create a DirectoryInfo object as I want to find some files in the directory.
DirectoryInfo updateDirectory = new DirectoryInfo(mappedPath);
But then updateDirectory.Exists
is false?? I can take the string from the mappedPath
and copy into Start->Run to get to the path so I know it exists. I am authenticating to the webservice using integrated windows authentication and have permissions to the necessary folders.
Is there something obvious I'm missing in the code? Or is this purely set-up and configuration of IIS etc.?