hi,
I would like to give the permission to a file.here is my code is as follows.
string filename="F:\\memory_reduce.txt";
FileSecurity fs =File.GetAccessControl(filename);
fs.AddAccessRule(new FileSystemAccessRule(@"DomainNme\\AccountName", FileSystemRights.FullControl, AccessControlType.Allow));
File.SetAccessControl(filename,fs);
but it's not working.
"some or all identity references could not be translated ". exception comes.
can someone help me? pls........................
Answers
Know the answer? Post it. Somebody with the same question will find it here.