You are changing the security settings of a file named MyData.xml.

You are changing the security settings of a file named MyData.xml. You need to preserve the
existing inherited access rules. You also need to prevent the access rules from inheriting changes
in the future. Which code segment should you use?


A. FileSecurity^ security = gcnew
    FileSecurity(“mydata.xml”, AccessControlSections::All);security->SetAccessRuleProtection(     
    true, true);File::SetAccessControl(“mydata.xml”, security);
B. FileSecurity^ security = gcnew
    FileSecurity();security->SetAccessRuleProtection(true,     
    true);File::SetAccessControl(“mydata.xml”, security);
C. FileSecurity^ security =
    File::GetAccessControl(“mydata.xml”);security->SetAccessRuleProtection(true, true);
D. FileSecurity^ security =
    File::GetAccessControl(“mydata.xml”);security->SetAuditRuleProtection(true,     
    true);File::SetAccessControl(“mydata.xml”, security);

 
Answer: A

No comments:

Post a Comment