Suche senden
Hochladen
Asp.net mvc filters
•
Als PPTX, PDF herunterladen
•
4 gefällt mir
•
1,991 views
Eyal Vardi
Folgen
Technologie
Business
Melden
Teilen
Melden
Teilen
1 von 25
Jetzt herunterladen
Empfohlen
Test automation using selenium
Test automation using selenium
shreyas JC
SQLITE Android
SQLITE Android
Sourabh Sahu
Introduction Node.js
Introduction Node.js
Erik van Appeldoorn
Full session asp net mvc vs aspnet core
Full session asp net mvc vs aspnet core
fizmhd
Inversion of Control and Dependency Injection
Inversion of Control and Dependency Injection
Dinesh Sharma
selenium with python training
selenium with python training
SaiprasadVella
Introduction to ASP.NET
Introduction to ASP.NET
Rajkumarsoy
Test your microservices with REST-Assured
Test your microservices with REST-Assured
Michel Schudel
Empfohlen
Test automation using selenium
Test automation using selenium
shreyas JC
SQLITE Android
SQLITE Android
Sourabh Sahu
Introduction Node.js
Introduction Node.js
Erik van Appeldoorn
Full session asp net mvc vs aspnet core
Full session asp net mvc vs aspnet core
fizmhd
Inversion of Control and Dependency Injection
Inversion of Control and Dependency Injection
Dinesh Sharma
selenium with python training
selenium with python training
SaiprasadVella
Introduction to ASP.NET
Introduction to ASP.NET
Rajkumarsoy
Test your microservices with REST-Assured
Test your microservices with REST-Assured
Michel Schudel
Selenium cheat sheet
Selenium cheat sheet
Sri Priya P Kulkarni
ExpandableListView and GridView
ExpandableListView and GridView
Headerlabs Infotech Pvt. Ltd.
ASP.NET Web API
ASP.NET Web API
habib_786
Security Model in .NET Framework
Security Model in .NET Framework
Mikhail Shcherbakov
Intégration continue et déploiement continue avec Jenkins
Intégration continue et déploiement continue avec Jenkins
Kokou Gaglo
Webpack Introduction
Webpack Introduction
Anjali Chawla
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
Git interview questions | Edureka
Git interview questions | Edureka
Edureka!
Spring Security 5
Spring Security 5
Jesus Perez Franco
Spring Security
Spring Security
Knoldus Inc.
ASP.NET Core MVC with EF Core code first
ASP.NET Core MVC with EF Core code first
Md. Aftab Uddin Kajal
Nodejs presentation
Nodejs presentation
Arvind Devaraj
Asp.net architecture
Asp.net architecture
Iblesoft
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
Svetlin Nakov
Automation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
Edureka!
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium
Zoe Gilbert
Introduction to React Native
Introduction to React Native
Amazon Web Services
QSpiders - Selenium Webdriver
QSpiders - Selenium Webdriver
Qspiders - Software Testing Training Institute
Integration testing for microservices with Spring Boot
Integration testing for microservices with Spring Boot
Oleksandr Romanov
Asp.net web api extensibility
Asp.net web api extensibility
Eyal Vardi
Asp.net mvc internals & extensibility
Asp.net mvc internals & extensibility
Eyal Vardi
Weitere ähnliche Inhalte
Was ist angesagt?
Selenium cheat sheet
Selenium cheat sheet
Sri Priya P Kulkarni
ExpandableListView and GridView
ExpandableListView and GridView
Headerlabs Infotech Pvt. Ltd.
ASP.NET Web API
ASP.NET Web API
habib_786
Security Model in .NET Framework
Security Model in .NET Framework
Mikhail Shcherbakov
Intégration continue et déploiement continue avec Jenkins
Intégration continue et déploiement continue avec Jenkins
Kokou Gaglo
Webpack Introduction
Webpack Introduction
Anjali Chawla
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
Git interview questions | Edureka
Git interview questions | Edureka
Edureka!
Spring Security 5
Spring Security 5
Jesus Perez Franco
Spring Security
Spring Security
Knoldus Inc.
ASP.NET Core MVC with EF Core code first
ASP.NET Core MVC with EF Core code first
Md. Aftab Uddin Kajal
Nodejs presentation
Nodejs presentation
Arvind Devaraj
Asp.net architecture
Asp.net architecture
Iblesoft
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
Svetlin Nakov
Automation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
Edureka!
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium
Zoe Gilbert
Introduction to React Native
Introduction to React Native
Amazon Web Services
QSpiders - Selenium Webdriver
QSpiders - Selenium Webdriver
Qspiders - Software Testing Training Institute
Integration testing for microservices with Spring Boot
Integration testing for microservices with Spring Boot
Oleksandr Romanov
Was ist angesagt?
(20)
Selenium cheat sheet
Selenium cheat sheet
ExpandableListView and GridView
ExpandableListView and GridView
ASP.NET Web API
ASP.NET Web API
Security Model in .NET Framework
Security Model in .NET Framework
Intégration continue et déploiement continue avec Jenkins
Intégration continue et déploiement continue avec Jenkins
Webpack Introduction
Webpack Introduction
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
Git interview questions | Edureka
Git interview questions | Edureka
Spring Security 5
Spring Security 5
Spring Security
Spring Security
ASP.NET Core MVC with EF Core code first
ASP.NET Core MVC with EF Core code first
Nodejs presentation
Nodejs presentation
Asp.net architecture
Asp.net architecture
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
Automation - web testing with selenium
Automation - web testing with selenium
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium
Introduction to React Native
Introduction to React Native
QSpiders - Selenium Webdriver
QSpiders - Selenium Webdriver
Integration testing for microservices with Spring Boot
Integration testing for microservices with Spring Boot
Ähnlich wie Asp.net mvc filters
Asp.net web api extensibility
Asp.net web api extensibility
Eyal Vardi
Asp.net mvc internals & extensibility
Asp.net mvc internals & extensibility
Eyal Vardi
Asp.Net Mvc Internals & Extensibility
Asp.Net Mvc Internals & Extensibility
Eyal Vardi
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
Qualcomm Developer Network
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
Satya Harish
Triggers, actions & behaviors in XAML
Triggers, actions & behaviors in XAML
Eyal Vardi
Methods and practices to analyze the performance of your application with Int...
Methods and practices to analyze the performance of your application with Int...
Intel Software Brasil
Models
Models
Eyal Vardi
Advanced java programming
Advanced java programming
nibiganesh
Servlet Filters
Servlet Filters
Wings Interactive
Prism Navigation
Prism Navigation
Eyal Vardi
File000131
File000131
Desmond Devendran
Vizualytics Execution Management
Vizualytics Execution Management
Matt Carlucci
OpUtils webinar
OpUtils webinar
ManageEngine, Zoho Corporation
Utilisation des capteurs dans les applications windows 8
Utilisation des capteurs dans les applications windows 8
Intel Developer Zone Community
Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010
Anna Russo
A-Passwordless-Future--WebAuthn-for-Java-Developers.pdf
A-Passwordless-Future--WebAuthn-for-Java-Developers.pdf
MohankumarRamachandr1
Testing Fiber-Optic Systems
Testing Fiber-Optic Systems
KHNOG
10 Ace 2010 Aras Federation Workshop
10 Ace 2010 Aras Federation Workshop
Prodeos
Web api routing
Web api routing
Eyal Vardi
Ähnlich wie Asp.net mvc filters
(20)
Asp.net web api extensibility
Asp.net web api extensibility
Asp.net mvc internals & extensibility
Asp.net mvc internals & extensibility
Asp.Net Mvc Internals & Extensibility
Asp.Net Mvc Internals & Extensibility
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
Triggers, actions & behaviors in XAML
Triggers, actions & behaviors in XAML
Methods and practices to analyze the performance of your application with Int...
Methods and practices to analyze the performance of your application with Int...
Models
Models
Advanced java programming
Advanced java programming
Servlet Filters
Servlet Filters
Prism Navigation
Prism Navigation
File000131
File000131
Vizualytics Execution Management
Vizualytics Execution Management
OpUtils webinar
OpUtils webinar
Utilisation des capteurs dans les applications windows 8
Utilisation des capteurs dans les applications windows 8
Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010
A-Passwordless-Future--WebAuthn-for-Java-Developers.pdf
A-Passwordless-Future--WebAuthn-for-Java-Developers.pdf
Testing Fiber-Optic Systems
Testing Fiber-Optic Systems
10 Ace 2010 Aras Federation Workshop
10 Ace 2010 Aras Federation Workshop
Web api routing
Web api routing
Mehr von Eyal Vardi
Why magic
Why magic
Eyal Vardi
Smart Contract
Smart Contract
Eyal Vardi
Rachel's grandmother's recipes
Rachel's grandmother's recipes
Eyal Vardi
Performance Optimization In Angular 2
Performance Optimization In Angular 2
Eyal Vardi
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
Eyal Vardi
Angular 2 NgModule
Angular 2 NgModule
Eyal Vardi
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.x
Eyal Vardi
Angular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time Compilation
Eyal Vardi
Routing And Navigation
Routing And Navigation
Eyal Vardi
Angular 2 Architecture
Angular 2 Architecture
Eyal Vardi
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
Eyal Vardi
Angular 2.0 Views
Angular 2.0 Views
Eyal Vardi
Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0
Eyal Vardi
Template syntax in Angular 2.0
Template syntax in Angular 2.0
Eyal Vardi
Http Communication in Angular 2.0
Http Communication in Angular 2.0
Eyal Vardi
Angular 2.0 Dependency injection
Angular 2.0 Dependency injection
Eyal Vardi
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
Eyal Vardi
Async & Parallel in JavaScript
Async & Parallel in JavaScript
Eyal Vardi
Angular 2.0 Pipes
Angular 2.0 Pipes
Eyal Vardi
Angular 2.0 forms
Angular 2.0 forms
Eyal Vardi
Mehr von Eyal Vardi
(20)
Why magic
Why magic
Smart Contract
Smart Contract
Rachel's grandmother's recipes
Rachel's grandmother's recipes
Performance Optimization In Angular 2
Performance Optimization In Angular 2
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 NgModule
Angular 2 NgModule
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.x
Angular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time Compilation
Routing And Navigation
Routing And Navigation
Angular 2 Architecture
Angular 2 Architecture
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
Angular 2.0 Views
Angular 2.0 Views
Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0
Template syntax in Angular 2.0
Template syntax in Angular 2.0
Http Communication in Angular 2.0
Http Communication in Angular 2.0
Angular 2.0 Dependency injection
Angular 2.0 Dependency injection
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
Async & Parallel in JavaScript
Async & Parallel in JavaScript
Angular 2.0 Pipes
Angular 2.0 Pipes
Angular 2.0 forms
Angular 2.0 forms
Kürzlich hochgeladen
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
BkGupta21
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Lars Bell
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
LoriGlavin3
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
DianaGray10
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
hariprasad279825
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
LoriGlavin3
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
Dilum Bandara
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Fwdays
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Alex Barbosa Coqueiro
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
LoriGlavin3
Training state-of-the-art general text embedding
Training state-of-the-art general text embedding
Zilliz
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
Rick Flair
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Kürzlich hochgeladen
(20)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Training state-of-the-art general text embedding
Training state-of-the-art general text embedding
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Asp.net mvc filters
1.
MVC Filters
Eyal Vardi CEO E4D Solutions LTD Microsoft MVP Visual C# blog: www.eVardi.com
2.
Agenda
What is Filters? Built-in Filters Filter Interfaces Custom Filters Filter Providers © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
3.
ASP.NET MVC Filters
Filters are custom classes that provide both a declarative and programmatic means to add pre-action and post-action behavior to controller action methods. [HandleError] [Authorize] public class CourseController : Controller { [OutputCache] [RequireHttps] public ActionResult Net( string name ) { ViewBag.Course = BL.GetCourse(name); return View(); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
4.
Filter Interfaces
Action Method Action Result 1 2 3 4 © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
5.
Controller Context
1 6 2 3 4 5 © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
6.
Filter Order
Filters run in the following order: Authorization filters Action filters Response filters Exception filters © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
7.
Controller & Filters
The Controller class implements each of the filter interfaces. You can implement any of the filters for a specific controller by overriding the controller's On<Filter> method. OnAuthorization OnActionExecuting OnActionExecuted OnResultExecuting OnResultExecuted OnException © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
8.
“Install” Filters
You can “Install” a filter in the following ways: Attribute on Actions or Controllers Add to Global Filters © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
9.
IAuthorizationFilter
Make security decisions about whether to execute an action method. AuthorizeAttribute RequireHttpsAttribute © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
10.
Authorize Attribute Sample
Authorization won’t be granted unless both conditions are met, Users & Roles. [Authorize(Users=“Eyal, Oz”, Roles=“Admin”)] public class CourseController : Controller { public ActionResult Net( string name ) { ViewBag.Course = BL.GetCourse(name); return View(); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
11.
Custom Authorization Policy
public class MyAuthorizationAttribute : AuthorizeAttribute { protected override bool AuthorizeCore(HttpContextBase httpContext) { return httpContext.Request.IsLocal || AuthorizeCore(httpContext); } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
12.
IActionFilter Interface
OnActionExecuting Runs before the action method. OnActionExecuted Runs after the action method © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
13.
IActionFilter Context’s © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
14.
IResultFilter Interface
OnResultExecuting Runs before the ActionResult object is executed. OnResultExecuted Runs after the result. Can perform additional processing of the result. The OutputCacheAttribute is one example of a result filter. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
15.
IResultFilter Context’s © 2010
E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
16.
IExceptionFilter
Execute if there is an unhandled exception thrown during the execution of the ASP.NET MVC pipeline. Can be used for logging or displaying an error page. HandleErrorAttribute is one example of an exception filter. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
17.
Handle Error Attribute
You can specify an exception and the names of a view and layout. Works only when custom errors are enabled in the Web.config file <customErrors mode="On" /> inside the <system.web> The view get HandleErrorInfo © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
18.
Custom Exception Filter
public class MyExceptionAttribute: FilterAttribute, IExceptionFilter { public void OnException(ExceptionContext filterContext) { if (!filterContext.ExceptionHandled && filterContext.Exception is NullReferenceException) { filterContext.Result = new RedirectResult("/MyError.html"); filterContext.ExceptionHandled = true; } } } © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
19.
Filters © 2010 E4D
LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
20.
First
Global Controller Action Last Filter I Filter I Filter I Filter I Filter I Filter II Filter II Filter II Filter II Filter II Action Method Action Result Authorization Action Result Exception Filter I Filter I Filter I Filter I Filter I Filter II Filter I Filter II Filter I Filter II Filter I Filter I Filter I Filter I Filter I Filter II Filter I Filter II Filter I Filter I Filter I Filter I Filter II Filter II Filter I Filter I Filter I Filter I Filter II Filter I Filter I Filter II Filter I Filter II Filter I Filter I Filter I Filter I Filter I Filter I © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
21.
Custom Filter
You can create a filter in the following ways: Override one or more of the controller's On<Filter> methods. Create an attribute class that derives from ActionFilterAttribute or FilterAttribute. Register a filter with the filter provider (the FilterProviders class). Register a global filter using the GlobalFilterCollection class. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
22.
Custom Attribute Filters ©
2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
23.
Custom Global Filters ©
2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
24.
Filter Providers
By default, ASP.NET MVC registers the following filter providers: Filters for global filters. FilterAttributeFilterProvider for filter attributes. ControllerInstanceFilterProvider for controller instances. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
25.
The Filter Provider
Interface The GetFilters method returns all of the IFilterProvider instances in the service locator. © 2010 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: Eyal@E4D.co.il
Jetzt herunterladen