30. Using Filters Flashcards

1
Q

What are filters?

A

Filters inject extra logic into request processing. Filters are like middleware that is applied to a single endpoint, which can be an action or a page handler method, and they provide an elegant way to manage a specific set of requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an Authorization filter?

A

This type of filter is used to apply the application’s authorization policy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

WHat is a Resource filter?

A

This type of filter is used to intercept requests, typically to implement features such as caching.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an Action filter?

A

This type of filter is used to modify the request before it is received by an action method or to modify the action result after it has been produced. This type of filter can be applied only to controllers and actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a Page filter?

A

This type of filter is used to modify the request before it is received by a Razor Page handler method or to modify the action result after it has been produced. This type of filter can be applied only to Razor Pages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Result filter?

A

This type of filter is used to alter the action result before it is executed or to modify the result after execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an Exception filter?

A

This type of filter is used to handle exceptions that occur during the execution of the action method or page handler.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly