Article ID: 297943 - View products that this article applies to.
This article was previously published under Q297943
This article describes how to get started with Active Server Pages (ASP). This article is one of a series of articles that discuss an important "Getting Started" topic.
AudienceThis article is intended for novice and intermediate customers who are familiar with computer programming. Although prior experience with a Web development language such as HTML is helpful, you do not have to have prior experience to complete the provided steps.
What is ASP?ASP is a set of software components that run on a Web server and allow Web developers to build dynamic Web pages. The advantage of ASP over static HTML Web pages is that an ASP page is like a computer program that runs on a Web server and can calculate results, process user input, read from or write to databases and files, and insert "live" updated content every time a user browses the page.
Related TechnologiesASP runs with a Web server on the Microsoft Windows platform. The Web server that is used is Internet Information Server (IIS). It is also possible to run ASP with a limited feature set on Microsoft Personal Web Server (PWS), which runs on Microsoft Windows 95, Microsoft Windows 98, and Microsoft Windows NT Workstation. ASP can also run on Unix operating systems by using special extensions that are created by software vendors.
Because ASP is frquently used to create business applications on the Web, it is regularly used with databases such as Microsoft Access, Microsoft SQL Server, or databases from other vendors. When used in conjunction with a database, ASP pages can even run transactional applications, such as those used by banks, by using the features of COM+ or Microsoft Transaction Server (MTS). A number of tools can be used to create ASP pages, ranging from simple text editors such as Notepad, popular Web site creation tools by Microsoft and other vendors, or a full-featured programming tool such as Microsoft Visual InterDev.
Step 1: Install ASPWindows 2000
ASP version 3.0 is included with all versions of the Microsoft Windows 2000 operating system. ASP is installed automatically when you install the Internet Information Services option with Windows 2000. To install this option, follow these steps:
The older version of ASP, version 2.0, runs on Microsoft Windows NT 4.0 Server, which requires you to install the Windows NT 4.0 Option Pack. To install ASP, select Internet Information Server from the setup dialog box in which you to select components to install. Also, install the latest Windows NT 4.0 Service Pack with the Option Pack.
To install the Windows NT 4.0 Option Pack and the latest Windows NT 4.0 Service Pack, visit the following Microsoft Web sites:
Windows NT 4.0 Option PackWindows 95, Windows 98, and Windows NT 4.0 Workstation
Windows NT 4.0 Service Pack
ASP version 2.0 also runs on Windows 95, Windows 98, and Windows NT 4.0 Workstation by installing Personal Web Server (PWS). PWS is included with the Windows NT Option Pack. When the download wizard runs, select the appropriate operating system (for example, select Windows 95).
To download the Windows NT Option Pack, visit the following Microsoft Web site:
Windows NT 4.0 Option PackWindows Millennium Edition (Me)
ASP is not supported on Windows Millennium Edition.
Step 2: Configure a Web Application on the Web ServerAfter you install IIS or PWS, you must configure a Web application on the Web server. This article assumes that you are running IIS version 5.0 on Windows 2000. These instructions also work with IIS version 4.0 on Windows NT 4.0 Server, and the ASP code works on both IIS and PWS. For instructions on configuring a Web application for PWS, see the documentation that is included with PWS.NOTE: Microsoft Visual InterDev version 6.0 and Microsoft FrontPage 2000 can automatically perform application setup for you on the Web server. If you are using one of these programs to create Web sites, you can skip the following manual setup instructions and continue directly to step 3.
Step 3: Create Your First ASP PageNOTE: For this example, do not use Visual InterDev or FrontPage to create an ASP page. Although both applications can create ASP pages easily, it is better for learning purposes to hand-code the ASP page in a simple text editor such as Notepad.
Step 4: Save the ASP Page to the Web ApplicationNow save your ASP page to the Windows folder that is created for your Web application in step 1. When you used the Server Extensions Web Wizard in step 1, you typed a folder name for the physical Windows folder that contains your Web application's content, and then the wizard created the folder for you. By default, the wizard creates the new folder and subweb in the root site for IIS. Because you used the name MyWeb for your folder and your title alias, the typical path to it on your system resembles the following:
C:\Inetpub\Wwwroot\MyWebWhen the MyWeb application is running under IIS, and you use a Web browser to view the application, the URL path for the application starts with the Web protocol (http://). Next, if this is a local Web that is only on your computer or on your company intranet, use your Windows computer name (for example, MyServer), or for publicly accessible Internet sites, use your domain name (for example, www.MyCompany.com). Finally, append the alias or title of your Web application's subfolder. The resulting URL resembles the following URL:
http://MyServer/MyWebTo save the ASP page that you created in the previous step and put it in your Web application, follow these steps:
Step 5: Use the Web Server to View the PageOpen a Web browser, such as Microsoft Internet Explorer. In the address line, type the URL to your new ASP page. For example, if your server is running locally (that is, it is not serving pages on the Internet), the URL resembles the following:
http://MyComputerName/MyWeb/Default.aspOr, if your server is serving pages on the Internet, the URL resembles the following:
http://www.MyCompany.com/MyWeb/Default.aspNote that new Web applications in IIS are automatically set to use either Default or Index as a default file in the virtual folder for your Web application. In other words, if you use Default.asp as the name for your home page or the first page in your application, you do not have to use the file name in the URL. You can just locate the virtual folder that contains the Default.asp page, as follows:
Additional Assistance with ASPFor more information, visit the ASP Newsgroup for peer-to-peer questions and answers. It is located under "Internet Server Programming", which located under "Web Development" at the following Microsoft Developer Network (MSDN) Online Newsgroups Web site:
Online NewsgroupsFor more information, visit the following Microsoft Web site:
Active Server Pages Support CenterFor help with technical questions, visit the following Microsoft Web site to search the Microsoft Knowledge Base:
Knowledge Base SearchTo get help directly from Microsoft, visit the following Microsoft Web site and open a technical support incident:
http://support.microsoft.com/directory/question.asp?sd=gn&fr=0For ASP tutorials, code samples, and references, visit the following Microsoft Web sites:
25+ ASP Tips to Improve Performance and StyleFor third-party ASP references and tutorials, visit the following Web sites:
Active Server Pages Tutorial
All About Scripting
An ASP You Can Grasp: The ABCs of Active Server Pages
COM Objects in ASP
4GuysFromRollaMicrosoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
Article ID: 297943 - Last Review: November 19, 2012 - Revision: 7.0
Contact us for more help
Connect with Answer Desk for expert help.