Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Extending ASP.NET with HttpHandlers and HttpModules  : Page 2

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.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

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.

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);

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date