PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

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?

PrepAway - Latest Free Exam Questions & Answers

A.
Dim objSecurity As New FileSecurity( _ “MyData.xml”,
AccessControlSections.All)objSecurity.SetAccessRuleProtection(True, True)File.SetAccessControl(“MyData.xml”, objSecurity)

B.
Dim objSecurity As New FileSecurity()objSecurity.SetAccessRuleProtection(True, True)File.SetAccessControl(“MyData.xml”, objSecurity)

C.
Dim objSecurity As FileSecurity =
_File.GetAccessControl(“MyData.xml”)objSecurity.SetAccessRuleProtection(True, True)

D.
Dim objSecurity As FileSecurity =
_File.GetAccessControl(“MyData.xml”)objSecurity.SetAuditRuleProtection(True, True)File.SetAccessControl(“myData.xml”, objSecurity)


Leave a Reply