HTTP Handler
   HOME

TheInfoList



OR:

An ASP.NET HTTP handler is a process that runs in response to a request made to an
ASP.NET ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name s ...
Web application. The most common handler is the ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler. HTTP handlers were not present in the "Classic" ASP. They implement the System.Web.IHttpHandler interface. Unlike
ASP.NET Web Forms ASP.NET Web Forms is a web application framework and one of several programming models supported by the Microsoft ASP.NET technology. Web Forms applications can be written in any programming language which supports the Common Language Runtime, su ...
, 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. HTTP handlers are similar to
ISAPI The Internet Server Application Programming Interface (ISAPI) is an N-tier API of Internet Information Services (IIS), Microsoft's collection of Windows-based web server services. The most prominent application of IIS and ISAPI is Microsoft's we ...
extensions. An HTTP module is an assembly that is called on every request that is made to your application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life-cycle events throughout the request. HTTP modules let you examine incoming and outgoing requests and take action based on the request. Unlike ASP.NET Web Forms, that have ".aspx" file extension, ASP.NET handlers by default have ".ashx" file extension. Handlers are considered to be more lightweight object than ASP.NET Web Forms. That is why they are used to serve dynamically-generated images, on-the-fly generated
PDF Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
-files and similar content to the
web browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
. With ASP.NET Core, this HTTP handlers have been replaced with "middleware" ApplicationBuilders (IApplicationBuilder) which allow routing requests based on request headers instead of just the URL path.


See also

* Open Web Interface for .NET


References


External links


HTTP Handlers and HTTP Modules Overview at MSDNIHttpHandlers at MSDN
{{Microsoft products ASP.NET