Author: smakawhat | Posted on: 3/29/2010 2:51:46 PM | Views : 274

I am wondering if there is any other approach to this that would work. 
I have a website with a C# coded aspx page that reads a directory and file structure on another server (not the webserver) using code that looks like this:
string path = @"\\serverName\dir\etc\place";
DirectoryInfo dir = new DirectoryInfo(path);
private void ExploreDirectory(DirectoryInfo dir)
{// get all the files in the directory and print their name and size
  FileInfo[] filesinDir = dir.GetFiles();
  foreach (FileInfo file in filesinDir)
  {
   ListContents(dir, file);
  }
  DirectoryInfo[] directories = dir.GetDirectories();
  foreach (DirectoryInfo newDir in directories)
  {
    ExploreDirectory(newDir);
   }
}
So in the ListContents function, I am basically reading the fi ...

Go to the complete details ...