Questions
After reading the chapter, you should be able to answer the following questions:
- Which of the following is the primary service that determines whether authorization is successful or not?
a.
IAuthorizationHandler
b.
IAuthorizationRequirement
c.
IAuthorizationService
d.
IAuthorizationPolicyProvider
- In the following code, access to the
Support
action is restricted to only theSupport
role:[AllowAnonymous] public class HomeController : Controller { Â Â Â Â Â Â public IactionResult Index() { Â Â Â Â return View(); } [Authorize(Roles ="Support")] public IactionResult Support() { Â Â Â Â Â Â Â Â return View(); } }
a. True
b. False