title: Directory.Move results in directory is not empty error
body: <p>I have a commercial ASP.NET application running on hundreds of servers. One customer is experiencing the error below when the app tries to move a directory on a file share accessed via UNC syntax.</p>
  
  <pre><code>System.IO.IOException: The directory is not empty.
  </code></pre>
  
  <p>Stack trace:</p>
  
  <pre><code>at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost)
  at GalleryServer.Business.AlbumSaveBehavior.PersistToFileSystemStore(IAlbum album)
  at GalleryServer.Business.AlbumSaveBehavior.Save()
  at GalleryServer.Business.GalleryObject.Save()
  at GalleryServer.Business.Album.MoveTo(IAlbum destinationAlbum)
  at GalleryServer.Web.Controller.AlbumController.TransferToAlbum(Int32 destinationAlbumId, GalleryItem[] itemsToTransfer, GalleryAssetTransferType  transferType, GalleryItem[] createdGalleryItems)
  at GalleryServer.Web.Api.AlbumsController.TransferTo(Int32 destinationAlbumId, GalleryItem[] itemsToTransfer, GalleryAssetTransferType transferType)
  </code></pre>
  
  <p>The code looks like this (simplified):</p>
  
  <pre><code>var sourceDir = @"\\server\storage\folder1";
  var destDir = @"\\server\storage\folder2";
  
  System.IO.Directory.Move(sourceDir, destDir);
  </code></pre>
  
  <p>I should note that the code succeeds when the directory is empty. It should work when it contains files, and indeed it does for other customers.</p>
  
  <p>The ASP.NET app is running in IIS with an AD account for the application pool identity. I've confirmed it has 'modify' permission to the file share directories.</p>
  
  <p>What kind of server configuration or permission condition could trigger this error? I've run a number of tests on my own and can't repro it.</p>