Jump to content

HTTP handler

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Tibti (talk | contribs) at 18:30, 4 April 2010. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

ASP.NET HTTP Handlers are a new technique presented in ASP.NET that was not present in the "Classic" ASP. HTTP Handlers are components that implement the System.Web.IHttpHandler interface. Unlike ASP.NET Pages they have no HTML-markup file, no events and other supporting. All they have is a code-file (written in any .NET-compatible language) that writes some data to the server HTTP response.

ASP.NET handlers have ".ashx" file extension (unlike pages, that have ".aspx" file extension).

Handlers are considered to be more lightweight object than pages. That's why they are used to serve dynamically-generated images, on-the-fly generated PDF-files and similar content to the web-browser.