Ans. ASP.NET MVC provides a simple way to inject your piece of code or logic either before or after an action is executed. This is achieved by decorating the controllers or actions with ASP.NET MVC attributes or custom attributes. An attribute or custom attribute implements the ASP.NET MVC filters (filter interface) and can contain your piece of code or logic. You can make your own custom filters or attributes either by implementing ASP.NET MVC filter interface or by inheriting and overriding methods of ASP.NET MVC filter attribute class if available.
Typically, Filters are used to perform the following common functionalities in your ASP.NET MVC application.
1. Custom Authentication
2. Custom Authorization (User based or Role based)
3. Error handling or logging
4. User Activity Logging
5. Data Caching
6. Data Compression
Typically, Filters are used to perform the following common functionalities in your ASP.NET MVC application.
1. Custom Authentication
2. Custom Authorization (User based or Role based)
3. Error handling or logging
4. User Activity Logging
5. Data Caching
6. Data Compression
No comments:
Post a Comment