DirectoryInfo di = new DirectoryInfo(@"\\Server\Test\test1"); DirectorySecurity ds=new DirectorySecurity(); ds.SetAccessRule(new FileSystemAccessRule(Enviroment.Username,FileSystemRights.FullControl, AccessControlType.Deny)); di.Create(ds);
DirectoryInfo di = new DirectoryInfo(@"\\Server\Test\test1"); DirectorySecurity ds=new DirectorySecurity(); ds.SetAccessRule(new FileSystemAccessRule(Enviroment.Username, FileSystemRights.FullControl, AccessControlType.Allow)); di.SetAccessControl(ds);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)