nerdexam
Microsoft

70-511 · Question #47

You are developing a Windows Presentation Foundation (WPF) application. You are implementing the security features for a function that requires File 10. The callers of this function that are higher…

The correct answer is C. [FileIOPermissionAttribute(SecurityAction.PermitOnly. See the full explanation below for the reasoning.

Question

You are developing a Windows Presentation Foundation (WPF) application. You are implementing the security features for a function that requires File 10. The callers of this function that are higher in the stack do not have permission to read the C:\temp directory. The function also accesses other resources that require permission. You need to ensure that the function has the proper permissions to read the C:\temp directory, and that all other resources in the function can still be accessed. Which attribute should you include with the function?

Options

  • A[FileIOPermissionAttribute(SecurityAction.Demand,
  • B[FileIOPermissionAttribute(SecurityAction.Assert,
  • C[FileIOPermissionAttribute(SecurityAction.PermitOnly,
  • D[FileIOPermissionAttribute(SecurityAction.InheritanceDemand,

How the community answered

(53 responses)
  • A
    9% (5)
  • B
    4% (2)
  • C
    81% (43)
  • D
    6% (3)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice