Active Server Pages

Last updated
Active Server Pages (ASP)
Developer(s) Microsoft
Stable release
3.0 / February 17, 2000;24 years ago (2000-02-17)
Type Web application framework
License Proprietary software
Website www.asp.net   OOjs UI icon edit-ltr-progressive.svg
Active Server Pages
Filename extension
.asp
Developed by Microsoft

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

Contents

It was first released in December 1996, before being superseded in January 2002 by ASP.NET.

History

Initially released as an add-on to Internet Information Services (IIS) via the Windows NT 4.0 Option Pack (1996), it is included as a component of Windows Server (since the initial release of Windows 2000 Server). There have been three versions of ASP, each introduced with different versions of IIS:

ASP 2.0 provides six built-in objects: Application, ASPError, Request, Response, Server, and Session. A Session object, for example, represents a session that maintains the state of variables from page to page. [1] The Active Scripting engine's support of the Component Object Model enables ASP websites to access functionality in compiled libraries such as dynamic-link libraries.

ASP 3.0 does not differ greatly from ASP 2.0 but it does offer some additional enhancements such as Server.Transfer method, Server.Execute method, and an enhanced ASPError object. ASP 3.0 also enables buffering by default and optimized the engine for better performance.

ASP was supported until 14 January 2020 on Windows 7. [2] The use of ASP pages will be supported on Windows 8 for a minimum of 10 years from the Windows 8 release date. [2] ASP is supported in all available versions of IIS as of 2024. [3]

Architecture

ASP uses scripting on the server to generate content that is sent to the client's web browser via HTTP response. The ASP interpreter reads and executes all script code between <% and %> tags, the result of which is content generation. These scripts were written using VBScript, JScript, or PerlScript. The @Language directive, the <scriptlanguage="language" runat="server"/> syntax or server configuration can be used to select the language. In the example below, Response.Write Now() is in an HTML page; it would be dynamically replaced by the current time of the server.

Server sideClient Side
Theserver'scurrenttime: <%Response.WriteNow()%>
The server's current time:8/11/2015 6:24:45 PM

Web pages with the .asp filename extension use ASP, although some web sites disguise their choice of scripting language for security purposes by using the more common .htm or .html extensions. Pages with the .aspx extension use compiled ASP.NET; however, ASP.NET pages may still include some ASP scripting. The introduction of ASP.NET led to use of the term Classic ASP for the original technology.

Sun Java System ASP (formerly ChiliSoft ASP) was a popular and reportedly complete emulator, [4] but it has been discontinued.

The Server object

The server object allows connections to databases (ADO), filesystem, and use of components installed on the server.

<%DimoAdoCon,oAdoRec,oAdoStm,oCdoCon,oCdoMsg,oSciDic,oSciFsm,oMswAdrSetoAdoCon=Server.CreateObject("ADODB.Connection")SetoAdoRec=Server.CreateObject("ADODB.Recordset")SetoAdoStm=Server.CreateObject("ADODB.Stream")SetoCdoCon=Server.CreateObject("CDO.Configuration")SetoCdoMsg=Server.CreateObject("CDO.Message")SetoSciDic=Server.CreateObject("Scripting.Dictionary")SetoSciFsm=Server.CreateObject("Scripting.FileSystemObject")SetoMswAdr=Server.CreateObject("MSWC.Swingbridge")%>

The Application object

This object stores global variables, which are variables accessible to all users.

<%Application("Ali")="My ASP Application"Response.Write"Welcome to "&Server.HTMLEncode(Application("Ali"))&"!"%>

The Session object

Stores variables accessible only to a single visitor, which are local variables.

<%IfLen(Request.QueryString("name"))>0ThenSession("name")=Request.QueryString("name")EndIfResponse.Write"Welcome "&Server.HTMLEncode(Session("name"))&"!"%>

The session object is file based and multiple concurrent read and/or write requests will be blocked and processed in turn.

The Err object

Allows the management and fixing of non-fatal errors.

<%OnErrorResumeNextResponse.Write1/0' Division by zeroIfErr.Number<>0ThenResponse.Write"Error Code: "&Server.HTMLEncode(Err.Number)&"<br />"Response.Write"Error Source: "&Server.HTMLEncode(Err.Source)&"<br />"Response.Write"Error Description: "&Server.HTMLEncode(Err.Description)&"<br />"Err.ClearEndIf%>

See also

Related Research Articles

<span class="mw-page-title-main">Microsoft Access</span> Database manager part of the Microsoft 365 package

Microsoft Access is a database management system (DBMS) from Microsoft that combines the relational Access Database Engine (ACE) with a graphical user interface and software-development tools. It is a member of the Microsoft 365 suite of applications, included in the Professional and higher editions or sold separately.

VBScript is a deprecated programming language for scripting on Microsoft Windows using Component Object Model (COM) based on classic Visual Basic and Active Scripting.

In computing, Microsoft's ActiveX Data Objects (ADO) comprises a set of Component Object Model (COM) objects for accessing data sources. A part of MDAC, it provides a middleware layer between programming languages and OLE DB. ADO allows a developer to write programs that access data without knowing how the database is implemented; developers must be aware of the database for connection only. No knowledge of SQL is required to access a database when using ADO, although one can use ADO to execute SQL commands directly.

Microsoft Personal Web Server (PWS) is a scaled-down web server software for Windows operating systems. It has fewer features than Microsoft's Internet Information Services (IIS) and its functions have been superseded by IIS and Visual Studio. Microsoft officially supports PWS on Windows 95-98, Windows 98 SE, and Windows NT 4.0. Prior to the release of Windows 2000, PWS was available as a free download as well as included on the Windows distribution CDs. PWS 4 was the last version and it can be found on the Windows 98 CD and the Windows NT 4.0 Option Pack.

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

Microsoft IIS is an extensible web server created by Microsoft for use with the Windows NT family. IIS supports HTTP, HTTP/2, HTTP/3, 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. A dedicated suite of software called SEO Toolkit is included in the latest version of the manager. This suite has several tools for SEO with features for metatag / web coding optimization, sitemaps / robots.txt configuration, website analysis, crawler setting, SSL server-side configuration and more.

<span class="mw-page-title-main">Windows Script Host</span> Automation technology for Windows

The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. This tool was first provided on Windows 95 after Build 950a on the installation discs as an optional installation configurable and installable by means of the Control Panel, and then a standard component of Windows 98 and subsequent and Windows NT 4.0 Build 1381 and by means of Service Pack 4. The WSH is also a means of automation for Internet Explorer via the installed WSH engines from IE Version 3.0 onwards; at this time VBScript became means of automation for Microsoft Outlook 97. The WSH is also an optional install provided with a VBScript and JScript engine for Windows CE 3.0 and following and some third-party engines including Rexx and other forms of Basic are also available.

ASP.NET is a 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 WebMatrix</span>

Microsoft WebMatrix is a discontinued cloud-connected website builder and HTML editor for Windows, geared towards web development. WebMatrix enables developers to build websites using built-in templates or popular open-source applications, with full support for ASP.NET, PHP, Node.js and HTML5. Microsoft developed WebMatrix for the purpose of providing web developers with coding, customization, and publishing capabilities all in one place.

JScript .NET is a .NET programming language developed by Microsoft.

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.

xHarbour is a free multi-platform extended Clipper compiler, offering multiple graphic terminals (GTs), including console drivers, GUIs, and hybrid console/GUIs. xHarbour is backward-compatible with Clipper and supports many language syntax extensions, greatly extended run-time libraries, and extensive third party support.

<span class="mw-page-title-main">Microsoft Data Access Components</span> Framework

Microsoft Data Access Components is a framework of interrelated Microsoft technologies that allows programmers a uniform and comprehensive way of developing applications that can access almost any data store. Its components include: ActiveX Data Objects (ADO), OLE DB, and Open Database Connectivity (ODBC). There have been several deprecated components as well, such as the Jet Database Engine, MSDASQL, and Remote Data Services (RDS). Some components have also become obsolete, such as the former Data Access Objects API and Remote Data Objects.

A Windows Script File (WSF) is a file type used by the Microsoft Windows Script Host. It allows mixing the scripting languages JScript and VBScript within a single file, or other scripting languages such as Perl, Object REXX, Python, or Kixtart if installed by the user. These types of scripts may also be used to link many other external scripts together using a src parameter on the <script> tag in a manner similar to HTML. Windows Script Files have the extension ".WSF". A WSF makes reference to each script module in a very basic XML hierarchy as shown below, adhering to those standards outside the <script> tags. Literal use of "</script>" or "<script>" inside your <script> tags and similar challenges can be handled by the use of CDATA, as shown within the examples.

<span class="mw-page-title-main">Visual Basic (classic)</span> Microsofts programming language based on BASIC and COM

Visual Basic (VB) before .NET, sometimes referred to as Classic Visual Basic, is a third-generation programming language, based on BASIC, and an integrated development environment (IDE), from Microsoft for Windows known for supporting rapid application development (RAD) of graphical user interface (GUI) applications, event-driven programming and both consumption and development of components via the Component Object Model (COM) technology.

ActivePerl is a distribution of Perl from ActiveState for Windows, macOS, Linux, Solaris, AIX and HP-UX.

<span class="mw-page-title-main">PowerShell</span> Cross-platform command-line interface and scripting language for system and network administration

PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-source and cross-platform on August 18, 2016, with the introduction of PowerShell Core. The former is built on the .NET Framework, the latter on .NET.

The Active Platform was the name of a development platform released by Microsoft in the 90s for creating web applications and delivering them to a PC desktop environment. The platform consisted of three parts: ActiveDesktop, which would use push technology to deliver the web applications to the desktop; ActiveServer, which would provide server side scripting; and ActiveX, a set of technologies created to allow software components on different machines to communicate with each other using COM and OLE.

ActiveVFP is a server-side scripting framework designed for Web development to produce dynamic Web pages. Similar to PHP, but using the native Visual Foxpro (VFP) language and database, ActiveVFP can also be used in Model-View-Controller (MVC) web applications as well as RESTful API. ActiveVFP is completely free and open source and does not require the purchase of Microsoft Visual FoxPro or any additional software.

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.

References

  1. The session data is kept server-side, the ID is saved as a HTTP Cookie. Source: ASP and Web Session Management, Microsoft
  2. 1 2 "Active Server Pages (ASP) support in Windows". Support (4.0 ed.). Microsoft. 30 January 2012. Retrieved 11 August 2015.
  3. Source: , Microsoft
  4. Weissinger, Keyton (6 October 2009). ASP in a Nutshell: A Desktop Quick Reference. O'Reilly Media, Inc. ISBN   978-1-4493-7959-9 . Retrieved 9 October 2013.