|
||
Http HandlersAn ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page via the page handler.
The ASP.NET page handler is only one type of handler. Creating a Custom HTTP Handler
To create a custom HTTP handler, you create a class that implements the IHttpHandler interface to create a synchronous handler or the IHttpAsyncHandler to create an asynchronous handler. Both handler interfaces require you to implement the IsReusable property and the ProcessRequest method. The IsReusable property specifies whether the IHttpHandlerFactory object (the object that actually calls the appropriate handler) can place your handlers in a pool and reuse them to increase performance, or whether it must create new instances every time the handler is needed. When you create a class file as your HTTP handler, you can have your handler respond to any file name extension that is not already mapped in IIS and in ASP.NET. For example, if you are creating an HTTP handler for generating an RSS feed, you can map your handler to the extension .rss. Code:
public class MyHendlers:IHttpHandler
<httpHandlers>
|
|
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 |