advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the code for this article
Have you explored HttpHandlers and HttpModules? Do you have a need for them? Did this article help you understand where they might be useful and how to use them? Let us know in the vb.dotnet.technical or csharp.general discussion groups.
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 3.7/5 | Rate this item | 19 users have rated this item.
Extending ASP.NET with HttpHandlers and HttpModules (cont'd)
From a programmer's point of view, HttpHandlers and HttpModules are nothing but classes that implement certain interfaces. HttpHandlers must implement the IHttpHandler interface. Some built-in classes such as HttpApplication and Page already implement the IHttpHandler interface. Similarly, new HttpModule-derived classes must implement the IHttpModule interface. Again, the Framework contains built-in classes such as FormsAuthenticationModule and WindowsAuthenticationModule that already implement the IHttpModule interface. Both interfaces reside in the System.Web namespace.
advertisement


The IHttpHandler interface is extremely simple. The interface consists of a read only property named IsReusable, which returns a Boolean value (typically true) indicating whether another request can use the IHttpHandler instance, and a ProcessRequest method, which takes a parameter of type HttpContext and performs the job of handling the extension.

   [Visual Basic]
   ReadOnly Property IsReusable As Boolean
   Sub ProcessRequest(ByVal context As HttpContext)
   
   [C#]
   bool IsReusable {get;}
   void ProcessRequest(HttpContext context);
Previous Page: ISAPI Extensions and Filters Next Page: Creating an HttpHandler


Page 1: ISAPI Extensions and FiltersPage 3: Creating an HttpHandler
Page 2: The IHttpHandler and IHttpModule InterfacesPage 4: Creating an HttpModule
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs