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.)
Get 50% Discount on All Your Purchases
at PrepAway.com - Latest Exam Questions
This is ONE TIME OFFER
50%
Regarding other sources it´s
A and C
1
0
ERROR de tipeo de datos en la pregunta por que dice, restringuir el acceso al metodo EditBook para el usuario LibraryAdmin, se equivocaron al tipear
0
0
‘C’ is not correct. There is the attribute [Authorize] on the method EditBook(). The question says “You must restrict access to the EditBook method to the user named LibraryAdmin”. The user “LibraryAdmin” has no access to this method with the attribute [Authorize]. I think the only possible answer is ‘A’.
0
0
@Luiz ‘C’ is correct as they did the role checking in the method instead.
Here is where they do the checking.
if(this.HttpContext.User.Identity.Name != “LibraryAdmin”)
{
}
2
0
I think “A” only. As pointed out by Luiz.
0
0
This question is tricky. Answer will be A and C
0
0
A and C
1
0
Besides, part of that new 231Q 70-486 dumps are available here:
https://drive.google.com/open?id=0B-ob6L_QjGLpflNtUWtkNlk3ODJFY0pqOUhqVFEwc0lrd0QtamRxUHFLLUdWZEVDaGtlQWM
Best Regards!
2
0