How to get file owner from network drive file in C #?
I am using this code:
string user = System.IO.File.GetAccessControl("filepath").GetOwner(typeof(System.Security.Principal.NTAccount)).ToString();
I get the name of the file owner if the domain of the file owner matches my machine, but if the domain is different from my computer, then I get the error message " Some or all of the identifier links cannot be translated ."
Can this be done?
source
share