title: Directory.GetFiles works, Directory.GetDirectories doesn't on the same directory
body: <p>I have a simple file selector on my web application which uses Directory.GetFiles and Directory.GetDirectories to produce the UI.  This works perfectly on my localhost, but when I upload it to my Windows Server 2003 hosting I can only see files - on the same directory, GetFiles works but GetDirectories doesn't.</p>
  
  <p>The code is incredibly simple - the string dir is created by a Server.MapPath call, and then:</p>
  
  <pre><code>List&lt;string&gt; dirs = Directory.GetDirectories(dir).ToList();
  List&lt;string&gt; files = Directory.GetFiles(dir).ToList();
  </code></pre>
  
  <p>I have tried everything I can think of security-wise; even to the point of giving "Everyone" full access to all directories in the web root, and even this makes no difference.</p>
  
  <p>So if the issue is not with security, I would be very grateful of some suggestions for more things to try!</p>
  
  <p><strong>Update:</strong> I'm pretty dumb - the code that spat out the HTML contained some very old testing code that hadn't made any difference on local so hadn't been noticed and removed, but that caused every directory on the server to be ignored!  What was it?</p>
  
  <pre><code>if (!subDir.Contains(".")) { ...
  </code></pre>
  
  <p>On the server, all sites are in folders named by their domain - on local, they aren't.  Me == stupid.  Sorry everyone!</p>