Active Server Pages

Short description: Server-side java script engine

Active Server Pages (ASP)Developer(s)| Microsoft

|

Stable release|

3.0 / February 17, 2000; 26 years ago (2000-02-17)

Type| Web application framework
License| Proprietary software
Active Server PagesFilename extension| `.asp`

|

Developed by| Microsoft

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

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

## Contents

* 1 History
* 2 Architecture
* 2.1 The Server object
* 2.2 The Application object
* 2.3 The Session object
* 2.4 The Err object
* 3 See also
* 4 References
* 5 External links

## 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 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: 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 currently[when?] supported in all available versions of IIS.[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 `<script language="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 side | Client Side

|

The server's current time:

Response.Write Now()

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.

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) & "<br />"
Response.Write "Error Source: " & Server.HTMLEncode(Err.Source) & "<br />"
Response.Write "Error Description: " & Server.HTMLEncode(Err.Description) & "<br />"
Err.Clear
End If

## See also

* ASP.NET
* Template processor
* Comparison of web template engines
* Jakarta Server Pages
* PHP
* Common Gateway Interface

## 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. ↑ 2.0 2.1 "Active Server Pages (ASP) support in Windows". Microsoft. 30 January 2012. https://support.microsoft.com/en-us/kb/2669020.
3. ↑ Source: [1], 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. https://books.google.com/books?id=tUHeRwhGKcgC. Retrieved 9 October 2013.

## 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)

* v
* t
* e

Web interfaces

Server-side|

| Protocols|

* HTTP
* CGI
* SCGI
* FCGI
* AJP
* WSRP
* WebSocket

|

Server APIs|

* C NSAPI
* C ASAPI
* C ISAPI
* COM ASP
* Java servlet
* container
* CLI OWIN
* ASP.NET Handler
* Python WSGI
* Ruby Rack
* JavaScript JSGI
* Perl PSGI
* Lua WSAPI
* Portlet
* container

Apache modules|

* mod include
* mod jk
* mod lisp
* mod mono
* mod parrot
* mod perl
* mod php
* mod proxy
* mod python
* mod wsgi
* mod ruby
* Phusion Passenger

Topics|

* Web resource vs. Web service
* Open API
* Webhook
* Application server
* comparison
* Scripting

Client-side|

| Browser APIs|

* C NPAPI
* LiveConnect
* XPConnect
* C NPRuntime
* C PPAPI
* NaCl
* ActiveX
* BHO
* XBAP

|

Web APIs|

| W3C|

* Audio
* Canvas
* CORS
* DOM
* DOM events
* EME
* File
* Geolocation
* IndexedDB
* MSE
* SSE
* SVG
* Video
* WebAuthn
* WebRTC
* WebSocket
* Web messaging
* Web storage
* Web worker
* XMLHttpRequest
* WebAssembly

|

Khronos|

* WebCL
* WebGL

Others|

* Gears
* Web SQL Database (formerly W3C)
* WebUSB

Topics|

* Ajax and Remote scripting vs. DHTML
* Mashup
* Web IDL
* Scripting

Topics|

* Dynamic web page
* Web standards
* Rich web application
* Web API security
* Web application
* Web framework

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Active Server Pages. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Active_Server_Pages&oldid=748324"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template