title: Access a Remote Directory from C#
body: <p>I am trying to access a remote network share from a C# program in asp.net.  What I need is something like</p>
  
  <pre><code>function download(dirname)
  {
      directory = (This is the part I don't know how to do)
  
      for dir in directory:
          download(dir);
  
      for file in directory:
          copyfile(file);
  
  }
  </code></pre>
  
  <p>My problem is that the directory requires a username and password for access and I don't know how to provide them.  Thanks for any help you can offer.</p>