title: Accessing file across network fails with "The system detected a possible attempt to compromise security."
body: <p>Hi I am writing a WPF app that needs to access my files on another PC on my network (domain). My first try to access a remote folder has not been a raging success.</p>
  
  <p>On my Windows 7 laptop I entered in Windows Explorer</p>
  
  <blockquote>
    <p>\\WIN-DCname\c$</p>
  </blockquote>
  
  <p>, this is the path to C drive on my test domain controller, and when challenged I logged in with the administrator account for the DC. I can then access the folder tree of C drive as expected.</p>
  
  <p>As a test application I used the following to probe that same drive:</p>
  
  <pre><code>Try
      Dim DirInfo As New DirectoryInfo("\\WIN-DCname\c$")
      Dim Dirs = DirInfo.GetDirectories.OrderByDescending(Function(x) x.FullName)
  Catch ex As Exception
  End Try
  </code></pre>
  
  <p>but the GetDirectories line throws an exception:</p>
  
  <blockquote>
    <p>The system detected a possible attempt to compromise security. Please
    ensure that you can contact the server that authenticated you.</p>
  </blockquote>
  
  <p>I'm starting to think there is a permissions problem here.... Do I have to programmatically authenticate again prior to doing this? If so how?</p>
  
  <p>Or is it not possible to do a GetDirectories over the network? Is there another way?</p>
  
  <p>Thanks for any advice!</p>