HTTP handler

Last updated

An ASP.NET HTTP handler is a process that runs in response to a request made to an ASP.NET Web application. [1] 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. [2]

Contents

HTTP handlers were not present in the "Classic" ASP. 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 extensions. [3]

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. [4]

Unlike ASP.NET Web Forms, that have ".aspx" file extension, ASP.NET handlers by default have ".ashx" file extension. [5]

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-files and similar content to the web browser. [6]

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. [7]

See also

Related Research Articles

Active Server Pages (ASP) is Microsoft's first server-side scripting language and engine for dynamic web pages.

VBScript is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers without error handling and with subroutines and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

<span class="mw-page-title-main">Internet Information Services</span> Extensible web server software by Microsoft

Internet Information Services ('2S) is an extensible web server software created by Microsoft for use with the Windows NT family. IIS supports HTTP, HTTP/2, HTTPS, FTP, FTPS, SMTP and NNTP. It has been an integral part of the Windows NT family since Windows NT 4.0, though it may be absent from some editions, and is not active by default.

Extensible Application Markup Language is a declarative XML-based language developed by Microsoft for initializing structured values and objects. It is available under Microsoft's Open Specification Promise.

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 stands for Active Server Pages Network Enabled Technologies.

<span class="mw-page-title-main">Microsoft Visual Studio Express</span> Integrated development environment

Microsoft Visual Studio Express is a set of integrated development environments (IDEs) that Microsoft developed and released free of charge. They are function-limited version of the non-free Visual Studio and require mandatory registration. Express editions started with Visual Studio 2005.

<span class="mw-page-title-main">Windows Installer</span> Software

Windows Installer is a software component and application programming interface (API) of Microsoft Windows used for the installation, maintenance, and removal of software. The installation information, and optionally the files themselves, are packaged in installation packages, loosely relational databases structured as COM Structured Storages and commonly known as "MSI files", from their default filename extensions. The packages with the file extensions mst contain Windows Installer "Transformation Scripts", those with the msm extensions contain "Merge Modules" and the file extension pcp is used for "Patch Creation Properties". Windows Installer contains significant changes from its predecessor, Setup API. New features include a GUI framework and automatic generation of the uninstallation sequence. Windows Installer is positioned as an alternative to stand-alone executable installer frameworks such as older versions of InstallShield and NSIS.

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 web server.

The Web Server Gateway Interface is a simple calling convention for web servers to forward requests to web applications or frameworks written in the Python programming language. The current version of WSGI, version 1.0.1, is specified in Python Enhancement Proposal (PEP) 3333.

Windows Presentation Foundation (WPF) is a free and open-source graphical subsystem originally developed by Microsoft for rendering user interfaces in Windows-based applications. WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0 in 2006. WPF uses DirectX and attempts to provide a consistent programming model for building applications. It separates the user interface from business logic, and resembles similar XML-oriented object models, such as those implemented in XUL and SVG.

<span class="mw-page-title-main">Visual Basic (classic)</span> Event-driven programming language

The original Visual Basic is a third-generation event-driven programming language from Microsoft known for its Component Object Model (COM) programming model first released in 1991 and declared legacy during 2008. Microsoft intended Visual Basic to be relatively easy to learn and use. Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects.

<span class="mw-page-title-main">Apache Axis2</span> Web service engine

Apache Axis2 is a web service engine. It is a complete redesign and re-write of the widely used Apache Axis SOAP stack. Implementations of Axis2 are available in Java and C.

<span class="mw-page-title-main">SharePoint</span> Web application platform

SharePoint is a web-based collaborative platform that integrates natively with Microsoft Office. Launched in 2001, SharePoint is primarily sold as a document management and storage system, but the product is highly configurable and its usage varies substantially among organizations.

<span class="mw-page-title-main">Windows Search</span> Desktop search platform by Microsoft

Windows Search is a content index desktop search platform by Microsoft introduced in Windows Vista as a replacement for both the previous Indexing Service of Windows 2000 and the optional MSN Desktop Search for Windows XP and Windows Server 2003, designed to facilitate local and remote queries for files and non-file items in compatible applications including Windows Explorer. It was developed after the postponement of WinFS and introduced to Windows constituents originally touted as benefits of that platform.

<span class="mw-page-title-main">Rack (web server interface)</span> API specification for web applications in programming language Ruby

Rack is a modular interface between web servers and web applications developed in the Ruby programming language. With Rack, application programming interfaces (APIs) for web frameworks and middleware are wrapped into a single method call handling HTTP requests and responses.

AppFabric is a set of middleware technologies for Windows Server, released by Microsoft. It consists of two main feature areas: AppFabric Hosting and AppFabric Caching. Microsoft support for these ended in November 2017. A newer version of the product from Microsoft is Service Fabric.

Razor is an ASP.NET programming syntax used to create dynamic web pages with the C# or VB.NET programming languages. Razor was in development in June 2010 and was released for Microsoft Visual Studio 2010 in January 2011. Razor is a simple-syntax view engine and was released as part of MVC 3 and the WebMatrix tool set.

OWIN 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 applications could not easily be run on another Web server. OWIN aims to decouple the relationship between ASP.NET applications and IIS by defining a standard interface. Developers of Web servers can be sure that, if they implement OWIN correctly, ASP.NET applications will run on their server. Similarly, new Web frameworks could be developed as an alternative to ASP.NET. So long as they target OWIN, they will run on any OWIN compatible Web server, including IIS.

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, such as C# or Visual Basic. The main building blocks of Web Forms pages are server controls, which are reusable components responsible for rendering HTML markup and responding to events. A technique called view state is used to persist the state of server controls between normally stateless HTTP requests.

Microsoft Docs is the library of technical documentation for end users, developers, and IT professionals who work with Microsoft products. The Microsoft Docs website provides technical specifications, conceptual articles, tutorials, guides, API references, code samples and other information related to Microsoft software and web services. Microsoft Docs was introduced in 2016 as a replacement of MSDN and TechNet libraries which previously hosted some of these materials.

References

  1. "HTTP Handlers and HTTP Modules Overview". msdn.microsoft.com. Retrieved 15 March 2017.
  2. Archiveddocs. "HTTP Handlers and HTTP Modules Overview". learn.microsoft.com. Retrieved 2023-02-06.
  3. "Handlers in ASP.NET". Home. 2010-05-14. Retrieved 2023-02-06.
  4. Archiveddocs. "HTTP Handlers and HTTP Modules Overview". learn.microsoft.com. Retrieved 2023-02-06.
  5. Tripathi, Mayank. "HTTP Handlers And HTTP Modules In ASP.NET". www.c-sharpcorner.com. Retrieved 2023-02-06.
  6. "Handlers in ASP.NET". Home. 2010-05-14. Retrieved 2023-02-06.
  7. "Migrate HTTP handlers and modules to ASP.NET Core middleware". ASP.NET Core. Microsoft Docs . Retrieved 2019-10-17.