SlideShare a Scribd company logo
ASP.NET
Handlers & Modules

          Session Time: 30-45minutes

            By: Sunil Pottumuttu
Agenda
•   Introduction
•   The Problem
•   Extension Based Preprocessor
•   Event Based Preprocessor
•   Overall Picture
•   Steps to Implement
•   The Final Output
IIS & ASP.NET
Request Workflow
              IIS
                     IIS
                                          Application
            *.asmx
                       aspnet_isapi.dll
 HTTP                                                         Machine.config
                                              Web.config
 Request    *.asp
                       asp.dll




 HTTP
                                            Process Request
 Response
ASP.NET Configuration

• Machine.config defines default handlers or
  handler factories to manage requests
• Web.config may alter Machine.config
  settings at the application level
Machine.config Overrides Web.config
<httpHandlers>
 <add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory"/>
 <add verb="*" path="*.asmx"
       type="System.Web.Services.Protocols.WebServiceHandlerFactory,
       System.Web.Services, …/>
<add verb="*" path="*.soap"
       type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFac
tory, System.Runtime.Remoting, …/>
 <add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler"/>
</httpHandlers>



 <httpHandlers>
  <add verb=“GET" path="*.xml"
 type=“DotNetDashboard.Web.FileDownloadHandler, DotNetDashboard.Web,
 Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxx"/>
  <add verb="*" path=“displayImage.aspx"
 type=“DotNetDashboard.Web.ImageFormatter, DotNetDashboard.Web,
 Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxx” />
  <add verb="*" path=“*.xls” type="System.Web.HttpForbiddenHandler"/>
 </httpHandlers>
HttpHandler - The Extension
Based Preprocessor
HttpModule - Event Based
Preprocessor
Hook to the Events
Overall Picture
Some Handlers
IIS 7 – Handler Mappings & Demo
IIS 7 – Http Modules & Demo
Synchronous vs Asnchronous
• synchronous request, the ProcessRequest
  method is executed, and any markup
  produced is sent to the browser once the
  entire request is processed

• BeginProcessRequest and the
  EndProcessRequest
Virtual File Provider

•    Global.asax provides hooks into the events of the ASP.NET pipeline
    just like an httpModule

•   Global.asax provides is the capability to add handlers to events not
    available to modules, like Session_Start and Session_End.

•   httpModules have over Global. asax is the ability to compile modules
    into class libraries that can be used in multiple ASP.NET web sites
Modules vs Global.asax
• synchronous request, the ProcessRequest
  method is executed, and any markup
  produced is sent to the browser once the
  entire request is processed

• BeginProcessRequest and the
  EndProcessRequest
Imp Http Modules Events
•   BeginRequest
•   AuthenticateRequest
•   AuthorizeRequest
•   EndRequest
•   Error
Demo Material

More Related Content

PPTX
Building rest services using aspnetwebapi
PPTX
ASP.NET MVC and ajax
PPTX
SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...
PDF
Embracing HTTP in the era of API’s
PDF
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
PPTX
Asp.net core 1.0 (Peter Himschoot)
PDF
Writing a Fullstack Application with Javascript - Remote media player
PPT
Intro to SPA using JavaScript & ASP.NET
Building rest services using aspnetwebapi
ASP.NET MVC and ajax
SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...
Embracing HTTP in the era of API’s
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Asp.net core 1.0 (Peter Himschoot)
Writing a Fullstack Application with Javascript - Remote media player
Intro to SPA using JavaScript & ASP.NET

What's hot (20)

PPTX
Best Practices for creating WP REST API by Galkin Nikita
PPTX
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...
PPT
"Spring Boot. Boot up your development" Сергей Моренец
PPTX
Powershell For Developers
PDF
From server generated pages to client app in a micro-services world
PPTX
Mvc razor and working with data
PDF
Nuxt.js - Introduction
PDF
Wcf remaining
PPTX
PPT
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
PDF
Azure Container Apps
PPTX
Migrando una app de angular.js a Blazor
PDF
Nuxt.JS Introdruction
PPTX
ASP.NET Core 1.0
PPTX
An Introduction to hapi.js
PPTX
Introduction to ASP.NET 5
PPTX
Modern Applications With Asp.net Core 5 and Vue JS 3
PPTX
Angular on ASP.NET MVC 6
PDF
Drupal8 + AngularJS
PPT
Active Server Page(ASP)
Best Practices for creating WP REST API by Galkin Nikita
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...
"Spring Boot. Boot up your development" Сергей Моренец
Powershell For Developers
From server generated pages to client app in a micro-services world
Mvc razor and working with data
Nuxt.js - Introduction
Wcf remaining
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
Azure Container Apps
Migrando una app de angular.js a Blazor
Nuxt.JS Introdruction
ASP.NET Core 1.0
An Introduction to hapi.js
Introduction to ASP.NET 5
Modern Applications With Asp.net Core 5 and Vue JS 3
Angular on ASP.NET MVC 6
Drupal8 + AngularJS
Active Server Page(ASP)
Ad

Similar to Asp.NET Handlers and Modules (20)

PPTX
Skillwise - Advanced web application development
PDF
ASP.NET Overview - Alvin Lau
PPT
nodejs_at_a_glance, understanding java script
PPT
nodejs_at_a_glance.ppt
PDF
An Introduction to Tornado
PDF
Building a cloud based managed BigData platform for the enterprise
KEY
Developing High Performance Web Apps - CodeMash 2011
PDF
Advanced Asp.Net Concepts And Constructs
PPTX
10 tips to make your ASP.NET Apps Faster
PPT
35_P17CSC103_2020121208141238 java introduction .ppt
PPTX
MVC & SQL_In_1_Hour
PDF
CTU June 2011 - Things that Every ASP.NET Developer Should Know
PPTX
IIS request process
PPT
Asp.net tips
PPTX
Harish Understanding Aspnet
PPTX
Debugging the Web with Fiddler
PDF
Salesforce Performance hacks - Client Side
PPTX
Whats new in ASP.NET 4.0
PDF
Primefaces Nextgen Lju
Skillwise - Advanced web application development
ASP.NET Overview - Alvin Lau
nodejs_at_a_glance, understanding java script
nodejs_at_a_glance.ppt
An Introduction to Tornado
Building a cloud based managed BigData platform for the enterprise
Developing High Performance Web Apps - CodeMash 2011
Advanced Asp.Net Concepts And Constructs
10 tips to make your ASP.NET Apps Faster
35_P17CSC103_2020121208141238 java introduction .ppt
MVC & SQL_In_1_Hour
CTU June 2011 - Things that Every ASP.NET Developer Should Know
IIS request process
Asp.net tips
Harish Understanding Aspnet
Debugging the Web with Fiddler
Salesforce Performance hacks - Client Side
Whats new in ASP.NET 4.0
Primefaces Nextgen Lju
Ad

Recently uploaded (20)

PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PDF
The Final Stretch: How to Release a Game and Not Die in the Process.
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Pre independence Education in Inndia.pdf
PPTX
master seminar digital applications in india
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Business Ethics Teaching Materials for college
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Pharma ospi slides which help in ospi learning
PDF
Anesthesia in Laparoscopic Surgery in India
FourierSeries-QuestionsWithAnswers(Part-A).pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Cell Structure & Organelles in detailed.
Open Quiz Monsoon Mind Game Prelims.pptx
The Final Stretch: How to Release a Game and Not Die in the Process.
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
GDM (1) (1).pptx small presentation for students
Pre independence Education in Inndia.pdf
master seminar digital applications in india
102 student loan defaulters named and shamed – Is someone you know on the list?
Business Ethics Teaching Materials for college
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPH.pptx obstetrics and gynecology in nursing
Pharma ospi slides which help in ospi learning
Anesthesia in Laparoscopic Surgery in India

Asp.NET Handlers and Modules

  • 1. ASP.NET Handlers & Modules Session Time: 30-45minutes By: Sunil Pottumuttu
  • 2. Agenda • Introduction • The Problem • Extension Based Preprocessor • Event Based Preprocessor • Overall Picture • Steps to Implement • The Final Output
  • 3. IIS & ASP.NET Request Workflow IIS IIS Application *.asmx aspnet_isapi.dll HTTP Machine.config Web.config Request *.asp asp.dll HTTP Process Request Response
  • 4. ASP.NET Configuration • Machine.config defines default handlers or handler factories to manage requests • Web.config may alter Machine.config settings at the application level
  • 5. Machine.config Overrides Web.config <httpHandlers> <add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory"/> <add verb="*" path="*.asmx" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, …/> <add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFac tory, System.Runtime.Remoting, …/> <add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler"/> </httpHandlers> <httpHandlers> <add verb=“GET" path="*.xml" type=“DotNetDashboard.Web.FileDownloadHandler, DotNetDashboard.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxx"/> <add verb="*" path=“displayImage.aspx" type=“DotNetDashboard.Web.ImageFormatter, DotNetDashboard.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxx” /> <add verb="*" path=“*.xls” type="System.Web.HttpForbiddenHandler"/> </httpHandlers>
  • 6. HttpHandler - The Extension Based Preprocessor
  • 7. HttpModule - Event Based Preprocessor
  • 8. Hook to the Events
  • 11. IIS 7 – Handler Mappings & Demo
  • 12. IIS 7 – Http Modules & Demo
  • 13. Synchronous vs Asnchronous • synchronous request, the ProcessRequest method is executed, and any markup produced is sent to the browser once the entire request is processed • BeginProcessRequest and the EndProcessRequest
  • 14. Virtual File Provider • Global.asax provides hooks into the events of the ASP.NET pipeline just like an httpModule • Global.asax provides is the capability to add handlers to events not available to modules, like Session_Start and Session_End. • httpModules have over Global. asax is the ability to compile modules into class libraries that can be used in multiple ASP.NET web sites
  • 15. Modules vs Global.asax • synchronous request, the ProcessRequest method is executed, and any markup produced is sent to the browser once the entire request is processed • BeginProcessRequest and the EndProcessRequest
  • 16. Imp Http Modules Events • BeginRequest • AuthenticateRequest • AuthorizeRequest • EndRequest • Error