Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Active Server Pages
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Server-side java script engine}} {{ multiple issues| {{primary sources|date=February 2015}} {{more citations needed|date=February 2015}} }} {{Infobox software | name = Active Server Pages (ASP) | logo = | developer = [[Microsoft]] | latest_release_version = 3.0 | latest_release_date = {{Start date and age|2000|2|17}} | genre = [[Web application framework]] | license = [[Proprietary software]] | website = }} {{Infobox file format | name = Active Server Pages | logo = | extension = .asp | mime = | type code = | uniform type = | magic = | owner = [[Microsoft]] | genre = | container for = | contained by = | extended from = | extended to = | standard = | free = | url = }} '''Active Server Pages''' ('''ASP''') is [[Microsoft]]'s first [[server-side scripting|server-side]] [[Active Scripting|scripting language and engine]] for [[dynamic web page]]s. 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|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 [[Object (computer science)|objects]]: Application, ASPError, Request, Response, Server, and Session. A <code>Session</code> object, for example, represents a [[Session (computer science)|session]] that maintains the state of [[Variable (programming)|variables]] from page to page.<ref>The session data is kept server-side, the ID is saved as a [[HTTP Cookie]]. Source: [http://msdn.microsoft.com/en-us/library/ms972338.aspx ASP and Web Session Management], Microsoft</ref> The [[Active Scripting]] engine's support of the [[Component Object Model]] enables ASP [[website]]s to access functionality in compiled [[Library (computing)|libraries]] such as [[Dynamic-link library|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]].<ref name=":0">{{cite web|title=Active Server Pages (ASP) support in Windows|url=https://support.microsoft.com/en-us/kb/2669020|website=Support|publisher=[[Microsoft]]|access-date=11 August 2015|date=30 January 2012|edition=4.0}}</ref> The use of ASP pages will be supported on [[Windows 8]] for a minimum of 10 years from the Windows 8 release date.<ref name=":0" /> ASP is supported in all available versions of IIS as of 2024.<ref>Source: [https://support.microsoft.com/en-gb/help/2669020/active-server-pages-asp-support-in-windows], Microsoft</ref> == 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]], [[JScript]], or [[PerlScript]]. The <code>@Language</code> directive, the {{tag|script|s|params=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 |- style="vertical-align:top" |<syntaxhighlight lang="aspx-vb">The server's current time: <% Response.Write Now() %> </syntaxhighlight> |<syntaxhighlight lang="output">The server's current time: 8/11/2015 6:24:45 PM</syntaxhighlight> |} 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,<ref name="Weissinger2009">{{cite book|last=Weissinger|first=Keyton |title=ASP in a Nutshell: A Desktop Quick Reference|url=https://books.google.com/books?id=tUHeRwhGKcgC|access-date=9 October 2013|date=6 October 2009|publisher=O'Reilly Media, Inc.|isbn=978-1-4493-7959-9}}</ref> 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. <syntaxhighlight lang="vbscript"> <% 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") %> </syntaxhighlight> ===The Application object=== This object stores global variables, which are variables accessible to all users. <syntaxhighlight lang="aspx-vb"> <% Application("Ali") = "My ASP Application" Response.Write "Welcome to " & Server.HTMLEncode(Application("Ali")) & "!" %> </syntaxhighlight> ===The Session object=== Stores variables accessible only to a single visitor, which are local variables. <syntaxhighlight lang="vbscript"> <% If Len(Request.QueryString("name")) > 0 Then Session("name") = Request.QueryString("name") End If Response.Write "Welcome " & Server.HTMLEncode(Session("name")) & "!" %> </syntaxhighlight> 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. <syntaxhighlight Lang="vbscript"> <% 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 %> </syntaxhighlight> ==See also== * [[ASP.NET]] * [[Template processor]] * [[Comparison of web template engines]] * [[Jakarta Server Pages]] * [[PHP]] * [[Common Gateway Interface]] == References == {{Reflist}} ==External links== <!--===========================({{NoMoreLinks}})=============================== | PLEASE BE CAUTIOUS IN ADDING MORE LINKS TO THIS ARTICLE. WIKIPEDIA IS | | NOT A COLLECTION OF LINKS NOR SHOULD IT BE USED FOR ADVERTISING. | | | | Excessive or inappropriate links WILL BE DELETED. | | See [[Wikipedia:External links]] and [[Wikipedia:Spam]] for details. | | | | If there are already plentiful links, please propose additions or | | replacements on this article's discussion page. Or submit your link | | to the appropriate category at the Open Directory Project (www.dmoz.org)| | and link back to that category using the {{dmoz}} template. | ===========================({{NoMoreLinks}})===============================--> {{wikibooks|Active Server Pages}} * [http://msdn.microsoft.com/en-us/library/aa286483.aspx ASP on MSDN] * [http://support.microsoft.com/kb/2669020 Microsoft Support for ASP on Windows] * [http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-applications-on-iis-overview Classic ASP Applications on IIS 7.0 and IIS 7.5 Overview] * [http://www.classicasp.org/ Primitive Classic ASP Framework (XML, JSON, BENCODE)] {{Web interfaces}} [[Category:Microsoft server technology]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox file format
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:Multiple issues
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Sister project
(
edit
)
Template:Tag
(
edit
)
Template:Template other
(
edit
)
Template:Web interfaces
(
edit
)
Template:Wikibooks
(
edit
)