HOME

TheInfoList



OR:

Active Server Pages (ASP) is
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
's first
server-side In the client–server model, server-side refers to programs and operations that run on the server. This is in contrast to client-side programs and operations which run on the client. General concepts Typically, a server is a computer application ...
scripting language and engine for
dynamic web page A server-side dynamic web page is a web page whose construction is controlled by an application server processing server-side scripts. In server-side scripting, parameters determine how the assembly of every new web page proceeds, and includin ...
s. It was first released in December 1996, before being superseded in January 2002 by
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 ...
.


History

Initially released as an add-on to
Internet Information Services Internet Information Services (IIS-pronounced 2S, formerly Internet Information Server) 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. ...
(IIS) via the Windows NT 4.0 Option Pack (1996), it is included as a component of
Windows Server Windows Server (formerly Windows NT Server) is a group of operating systems (OS) for servers that Microsoft has been developing since July 27, 1993. The first OS that was released for this platform was Windows NT 3.1 Advanced Server. With the r ...
(since the initial release of
Windows 2000 Server Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was released to manufacturing on December 15, 1999, and was officiall ...
). There have been three versions of ASP, each introduced with different versions of IIS: * ASP 1.0 was released in December 1996 as part of IIS 3.0 * ASP 2.0 was released in September 1997 as part of IIS 4.0 * ASP 3.0 was released in November 2000 as part of IIS 5.0 ASP 2.0 provides six built-in
objects Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an ...
: Application, ASPError, Request, Response, Server, and Session. Session object, for example, represents a session that maintains the state of variables from page to page. The
Active Scripting Active Scripting (formerly known as ActiveX Scripting) is the technology used in Windows to implement component-based scripting support. It is based on OLE Automation (part of COM) and allows installation of additional scripting engines in the form ...
engine's support of the Component Object Model enables ASP
website A website (also written as a web site) is a collection of web pages and related content that is identified by a common domain name and published on at least one web server. Examples of notable websites are Google Search, Google, Facebook, Amaz ...
s to access functionality in compiled
libraries A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
such as
dynamic-link libraries Dynamic-link library (DLL) is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems. These libraries usually have the file extension DLL, OCX (for libraries containing ActiveX controls), o ...
. 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 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearly ...
. The use of ASP pages will be supported on
Windows 8 Windows 8 is a major release of the Windows NT operating system developed by Microsoft. It was Software release life cycle#Release to manufacturing (RTM), released to manufacturing on August 1, 2012; it was subsequently made available for downl ...
for a minimum of 10 years from the Windows 8 release date. ASP is currently supported in all available versions of IIS.Source

Microsoft


Architecture

ASP uses server-side scripting, 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 VBScript (''"Microsoft Visual Basic Scripting Edition"'') 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 w ...
,
JScript JScript is Microsoft's legacy dialect of the ECMAScript standard that is used in Microsoft's Internet Explorer 11 and older. JScript is implemented as an Active Scripting engine. This means that it can be "plugged in" to OLE Automation applicati ...
, or
PerlScript ActivePerl is a distribution of Perl from ActiveState (formerly part of Sophos) for Windows, macOS, Linux, Solaris, AIX and HP-UX. A few main editions are available, including: Community (free, for development use only), and several paid tier ...
. The @Language directive, the syntax or server configuration can be used to select the language. In the example below, Response.Write Now() is in an
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
page; it would be dynamically replaced by the current time of the server. Web pages with the ''.asp''
filename extension A filename extension, file name extension or file extension is a suffix to the name of a computer file (e.g., .txt, .docx, .md). The extension indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
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 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 ...
; 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, 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. <% Dim oAdoCon, oAdoRec, oAdoStm, oCdoCon, oCdoMsg, oSciDic, oSciFsm, oMswAdr Set oAdoCon = Server.CreateObject("ADODB.Connection") Set oAdoRec = Server.CreateObject("ADODB.Recordset") Set oAdoStm = Server.CreateObject("ADODB.Stream") Set oCdoCon = Server.CreateObject("CDO.Configuration") Set oCdoMsg = Server.CreateObject("CDO.Message") Set oSciDic = Server.CreateObject("Scripting.Dictionary") Set oSciFsm = Server.CreateObject("Scripting.FileSystemObject") Set oMswAdr = 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. <% If Len(Request.QueryString("name")) > 0 Then Session("name") = Request.QueryString("name") End If Response.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. <% On Error Resume Next Response.Write 1 / 0 ' Division by zero If Err.Number <> 0 Then Response.Write "Error Code: " & Server.HTMLEncode(Err.Number) & "
" Response.Write "Error Source: " & Server.HTMLEncode(Err.Source) & "
" Response.Write "Error Description: " & Server.HTMLEncode(Err.Description) & "
" Err.Clear End If %>


See also

*
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 ...
*
Template processor A template processor (also known as a template engine or template parser) is software designed to combine templates with a data model to produce result documents. The language that the templates are written in is known as a template language ...
*
Comparison of web template engines The following table lists the various web template engines used in Web template systems and a brief rundown of their features. See also * Template processor * Web template system A web template system in web publishing lets web designers ...
*
Jakarta Server Pages Jakarta Server Pages (JSP; formerly JavaServer Pages) is a collection of technologies that helps software developers create dynamically generated web pages based on HTML, XML, SOAP, or other document types. Released in 1999 by Sun Microsystems, ...
*
PHP PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group ...
*
Common Gateway Interface In computing, Common Gateway Interface (CGI) is an interface specification that enables web servers to execute an external program, typically to process user requests. Such programs are often written in a scripting language and are commonly ref ...


References


External links


ASP on MSDN

Microsoft Support for ASP on Windows

Classic ASP Applications on IIS 7.0 and IIS 7.5 Overview

Primitive Classic ASP Framework (XML, JSON, BENCODE)
{{Web interfaces Microsoft server technology