nerdexam
GIAC

GSSP-NET · Question #64

You work as a Software Developer for Mansoft Inc. You create an application and use it to create users as members of the local Users group. Which of the following code snippets imperatively demands…

The correct answer is A. System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); B. System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal). See the full explanation below for the reasoning.

Question

You work as a Software Developer for Mansoft Inc. You create an application and use it to create users as members of the local Users group. Which of the following code snippets imperatively demands that the current user is a member of the local Users group? Each correct answer represents a complete solution. Choose all that apply.

Options

  • ASystem.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
  • BSystem.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
  • CPrincipalPermission MyPermission = new PrincipalPermission(null, @"BUILTIN\Users",
  • DPrincipalPermission MyPermission = new PrincipalPermission(null, @"Users", true);

How the community answered

(28 responses)
  • A
    82% (23)
  • C
    11% (3)
  • D
    7% (2)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice