These are the way resources such as directories and files are secured in the NTFS file system which is commonly used file system in all windows. You can also view this file by selecting the security tab from the file’s properties dialog. To get this security tab follow the steps that is mentioned below...
Step-1: Create a text file.
Step-2: Right click on that file and click on properties.
Now you will get that security tab.
Code snippet to add a rule to the Access Control Li
System.Security.AccessControl.FileSecurity sec =
sec.AddAccessRule (new System.Security.AccessControl.FileSystemAccessRule (
System.IO.File.SetAccessControl (Server.MapPath (“Test.txt”), sec);
Asked In: Many Interviews |