Your SlideShare is downloading. ×
  • Like
Asp.NET Handlers and Modules
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Asp.NET Handlers and Modules

  • 3,094 views
Published

Basic understanding of ASP.NET HANDLERS and MODULES

Basic understanding of ASP.NET HANDLERS and MODULES

Published in Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
3,094
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
32
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. ASP.NETHandlers & 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.NETRequest 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.HttpRemotingHandlerFactory, 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 ExtensionBased Preprocessor
  • 7. HttpModule - Event BasedPreprocessor
  • 8. Hook to the Events
  • 9. Overall Picture
  • 10. Some Handlers
  • 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
  • 17. Demo Material