exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 123 discussion

Actual exam question from Microsoft's 70-486
Question #: 123
Topic #: 1
[All 70-486 Questions]

You are developing an ASP.NET MVC application that uses forms authentication. The user database contains a user named LibraryAdmin.
You have the following requirements:
✑ You must allow all users to access the GetBook method.
✑ You must restrict access to the EditBook method to the user named LibraryAdmin.
You need to implement the controller to meet the requirements.
Which code segment should you use? (Each correct answer presents a complete solution. Choose all that apply.)


  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
AlexFromGalax
Highly Voted 5 years, 6 months ago
Wrong, ✑ You must restrict access to the EditBook method to the user named LibraryAdmin. So the Library Admin should have access to Edit Book. So A and C are right
upvoted 17 times
...
Gods_Kenny
Highly Voted 5 years, 3 months ago
AC is correct
upvoted 5 times
...
Ekovalev
Most Recent 5 years, 7 months ago
In option A LibraryAdmin has access to EditBook. So option C is the only right here.
upvoted 3 times
Gorilla
5 years, 5 months ago
Also in C and this is the requirement, so A & C.
upvoted 5 times
...
Lt_munchies
4 years, 9 months ago
LibraryAdmin has to have access to EditBook method. A and C is the correct answer
upvoted 1 times
chupachup
4 years, 8 months ago
Did you read the requirements? It clearly says restrict access, in A LibraryAdmin does have the access. Ekovalev is right, only C is correct.
upvoted 1 times
murat12345
4 years, 7 months ago
You are wrong. [Authorize(Users = "LibraryAdmin")] means that the user with that username SHOULD be authenticated.
upvoted 1 times
...
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...