Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.cs?

You need to ensure that all the MVC controllers are secure.
Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.cs?

A. Option A
B. Option B
C. Option C
D. Option D

microsoft-exams

2 thoughts on “Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.cs?

  1. The A is Incorrect.

    The B is not good, controller.GetType().Attributes will not return custom attributes.

    The C is not good, where the Any() can not be equal to null.

    The D is good, because from scenario: If the logged-on user is an administrator, then the header will contain links to administrative functions. This information is read from a cookie that is set on the server.

    Answer is D.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.