Click here to Skip to main content
15,915,324 members

Comments by Gary Sun (Top 3 by date)

Gary Sun 2-Nov-16 3:38am View    
fileName = openFileDialog1.FileName;
DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(fileName));
System.Security.AccessControl.DirectorySecurity dirSecurity = di.GetAccessControl();
dirSecurity.AddAccessRule(new FileSystemAccessRule(@"GarySun\Administrator", FileSystemRights.Read, AccessControlType.Allow));

//it can not make removable device files readOnly
Gary Sun 5-Nov-14 0:36am View    
when
// Use current user’s domain
GPDomain domain = new GPDomain();
throw exception
The current security context with the Active Directory domain or forest unrelated
can you help me?
Gary Sun 22-Oct-14 20:45pm View    
I find it,Thank you very much!