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