August 2014
Intermediate to advanced
688 pages
18h 5m
English
CHAPTER 24
![]()
Filters Part II
In this chapter, I continue describing the Web API support for filters and demonstrate how authorization filters work. I also show you two kinds of special filters: exception filters and override filters. Table 24-1 summarizes this chapter.
Table 24-1. Chapter Summary
Problem | Solution | Listing |
|---|---|---|
Create an authorization filter. | Implement the IAuthorizationFilter interface, derive from the AuthorizationFilterAttribute class, or use the Authorize attribute. | 1, 5–9 |
Restrict access to an action method. | Apply an authorization attribute to the action method or its containing controller. | 2–4 |
Handle an exception thrown by an action method ... |