title: Folder Permissions - Some or all identity references could not be translated
body: <p>I would like to set folder ACL on remote server for a domain user but get always following error message:</p>
  
  <blockquote>
    <p>Some or all identity references could not be translated</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>
  
  <p>This is my code:</p>
  
  <pre><code>string folderPath = @"\\remoteServer\testDirectory"     
  string accountName = "domainUser"
  string domainName = "mydomain";
  accountName = domainName + "\\" + accountName;
  //What rights are we setting?
  
  //set on dir itself
  FileSystemAccessRule accessRule = new FileSystemAccessRule(accountName, FileSystemRights.FullControl, AccessControlType.Allow);
  
  DirectoryInfo dInfo = new DirectoryInfo(folderPath);
  DirectorySecurity dSecurity = dInfo.GetAccessControl();
  //dInfo.SetAccessControl(dSecurity);
  
  dSecurity.AddAccessRule(accessRule);`
  </code></pre>
  
  <p>If I enter only <code>userName</code> instead of <code>domainname\username</code> permission will be set but with "unknown account"</p>
  
  <p>Could someone please help...</p>
  
  <p>Thanks in advance.</p>