HOME

TheInfoList



OR:

An ASP.NET HTTP handler is a process that runs in response to a request made to an ASP.NET 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 Asp may refer to: Places * Asp, part of Densbüren, Aargau, Switzerland * Aspe (''Asp'' in Valencian), Alicante, Spain * Asp Lake, a lake in Minnesota Animals * Asp (fish) * Asp (snake), in antiquity, one of several venomous snakes ** ''Cera ...
. They implement the System.Web.IHttpHandler interface. Unlike ASP.NET Web Forms, 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 ASP.NET Core is a free and open-source web framework and successor to ASP.NET, developed by Microsoft. It is a modular framework that runs on both the full .NET Framework, on Windows, and the cross-platform .NET. However, ASP.NET Core version 3 on ...
, 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 OWIN (Open Web Interface for .NET) is a standard for an interface between .NET Web applications and Web servers. It is a community-owned open-source project. Prior to OWIN, Microsoft's ASP.NET technology was designed on top of IIS, and Web applic ...


References


External links


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