nerdexam
Microsoft

70-515 · Question #37

You are implementing an ASP.NET MVC 2 Web application that allows users to view and edit data. You need to ensure that only logged-in users can access the Edit action of the controller. What are two…

The correct answer is A. [Authorize(Users = "")] B. [Authorize(Roles = "")]. See the full explanation below for the reasoning.

Question

You are implementing an ASP.NET MVC 2 Web application that allows users to view and edit data. You need to ensure that only logged-in users can access the Edit action of the controller. What are two possible attributes that you can add to the Edit action to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

Options

  • A[Authorize(Users = "")]
  • B[Authorize(Roles = "")]
  • C[Authorize(Users = "*")]
  • D[Authorize(Roles = "*")]

How the community answered

(49 responses)
  • A
    80% (39)
  • C
    14% (7)
  • D
    6% (3)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice