advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
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
advertisement
 

Extending ASP.NET with HttpHandlers and HttpModules

Write custom file handlers and filters with ease in ASP.NET that perform special request-handling, or alter requests either before or after they're processed by the ASP.NET engine.  


advertisement
ASP.NET provides a robust framework for your Web applications. However, at times it becomes necessary to go beyond the out-of-the-box functionality.

For example, when you request a resource such as an HTML page or ASP page using the browser, IIS processes that resource based on its file extension. IIS processes ASP pages using a DLL named asp.dll. Similarly, IIS processes ASP.NET (.aspx) pages with the aspnet_isapi.dll. But sometimes you may need to process custom file extensions. Suppose you're developing a Web application that makes frequent use of graphics generated on-the-fly that display charts. You might want those files to use a custom file extension—for example .chart.


ISAPI Extensions and Filters
Before ASP.NET, the only way to process custom file extensions was to write an ISAPI (Internet Service Application Programming Interface) extension or an ISAPI filter. However, writing ISAPI extensions and filters is difficult, requires strong C/C++ skills, and is considered "out of reach" for many programmers. ASP.NET improves the situation greatly. ASP.NET's HttpExtensions and HttpModules provide functionality similar to ISAPI Extensions and ISAPI filters, respectively. Writing HttpHandlers and HttpModules is just a matter of implementing certain interfaces.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?