|
||
Http Modules
after the creation of the HttpContext object the HttpApplication object is created and while it does HttpModules get is action. While the Application object is suitable for handling application-wide events and data on a small scale, sometimes application-wide tasks need a little heavier machinery. HttpModules serve that purpose. ASP.NET includes a number of predefined HttpModules. For example, session state, authentication, and authorization are handled via HttpModules. Writing HttpModules is pretty straightforward, and is a great way to handle complex application-wide operations. For example, if you wanted to write your own authentication scheme, using HttpModules is a good way to do it. These events are listed below in the order in which they are executed:
public class MyHttpModules:IHttpModule { ... public void Init(HttpApplication context) { context.BeginRequest += new EventHandler(context_BeginRequest); context.ResolveRequestCache += new EventHandler(context_ResolveRequestCache); context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute); !!!between this two events the relevant handler will create the page and send the content to the buffer context.PostRequestHandlerExecute += new EventHandler(context_PostRequestHandlerExecute); add to web.config <httpmodules>
|
|
HOME|
IIS6 pipeline|
ASP.NET pipeline|
Http Modules|
Http Handlers|
Caching|
Web Services|
Page Life Cycle|
Ajax|
Jquery|
Session State ViewState| SEO| Mobile Basics| Mobile Handsets| C# Modifiers| C# Keywords| N-Tier| Design patterns| Stack & Heap| WCF Databases| Relational Model| functionalities| Stored procedures| fishmarket |
|
| © 2010 All Rights Reserved |