Skip to main content

Posts

Showing posts with the label write Permission from AX

Set Folder,File read,write Permission from AX

To Set Folder,File read,write Permission from AX you can try below code . Just you need to pass Domain,Folder  parameter in function as root and stFolder as mention in function below. void setAccess(str root, str stFolder) { System.Security.AccessControl.DirectorySecurity DirectorySec; System.IO.DirectoryInfo dirInformaiton; System.Security.AccessControl.FileSystemAccessRule FilesysaccessRule; System.Security.AccessControl.FileSystemRights fileSysRights; System.Security.AccessControl.AccessControlType accessControlType; UserInfo UserInfo; SHRDocuFolder LtabSHRDocuFolder; System.Security.AccessControl.InheritanceFlags inheritFlags; System.Security.AccessControl.PropagationFlags propFlags; ; dirInformaiton = new System.IO.DirectoryInfo(_root); DirectorySec = dirInformaiton.GetAccessControl(); fileSysRights = System.Security.AccessControl.FileSystemRights::Write; inheritFlags = System.Security.AccessControl.InheritanceFlags::ObjectInheri