title: List all shared folders from a network location
body: <p>I want to list all the shared directories from a network server.</p>
  
  <p>To list directories from a shared network directory I used </p>
  
  <pre><code>Directory.GetDirectories(@"\\server\share\")
  </code></pre>
  
  <p>The problem is I want to list all folders on <code>\\server</code>.</p>
  
  <p>If I use the same method I get an exception saying </p>
  
  <blockquote>
    <p>The UNC path should be of the form \server\share</p>
  </blockquote>
  
  <p>I looked all over the place and I can't find a solution for this. </p>
  
  <p>Does anybody have any idea of what I should do in order to display the folders in <code>\\share</code> ?</p>