Article ID: 297943 - Last Review: July 4, 2007 - Revision: 5.1 INFO: Getting Started with Active Server PagesThis article was previously published under Q297943 On This PageSUMMARY 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. MORE INFORMATIONAudienceThis 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-by-Step InstructionsStep 1: Install ASPWindows 2000ASP 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 Pack Windows 95, Windows 98, and Windows NT 4.0 Workstationhttp://www.microsoft.com/ntserver/nts/downloads/recommended/NT4OptPk/ (http://www.microsoft.com/ntserver/nts/downloads/recommended/NT4OptPk/) Windows NT 4.0 Service Pack http://www.microsoft.com/ntserver/nts/downloads/ (http://www.microsoft.com/ntserver/nts/downloads/) 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 Option Pack Windows Millennium Edition (Me)http://www.microsoft.com/ntserver/nts/downloads/recommended/NT4OptPk (http://www.microsoft.com/ntserver/nts/downloads/recommended/NT4OptPk) 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\MyWeb
When 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/MyWeb To save the ASP page that you created in the previous step and
put it in your Web application, follow these steps:
-or- http://www.MyCompany.com/MyWeb
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.asp
Or, if your server is serving pages on the Internet, the URL
resembles the following:
http://www.MyCompany.com/MyWeb/Default.asp
Note 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:
http://MyComputerName/MyWeb/
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: For more information, visit the following Microsoft Web site:
Active Server Pages Support Center For help with technical questions, visit the following Microsoft
Web site to search the Microsoft Knowledge Base: To get help directly from Microsoft, visit the following
Microsoft Web site and open a technical support incident: http://support.microsoft.com/?scid=ph;zh-cn;555 (http://support.microsoft.com/?scid=ph;zh-cn;555) http://support.microsoft.com/directory/question.asp?sd=gn&fr=0
(http://support.microsoft.com/?scid=http%3a%2f%2fsupport.microsoft.com%2fdirectory%2fquestion.asp%3fsd%3dgn%26amp%3bfr%3d0)
For ASP tutorials, code samples, and references, visit the
following Microsoft Web sites:
25+ ASP Tips to Improve Performance and Style For third-party ASP references and tutorials, visit the following
Web sites: http://msdn.microsoft.com/workshop/server/asp/asptips.asp (http://msdn.microsoft.com/workshop/server/asp/asptips.asp) Active Server Pages Guide http://msdn.microsoft.com/library/psdk/iisref/aspguide.htm (http://msdn.microsoft.com/library/psdk/iisref/aspguide.htm) Active Server Pages Tutorial http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnasp/html (http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnasp/html) All About Scripting http://msdn.microsoft.com/workshop/author/script/allabout.asp (http://msdn.microsoft.com/workshop/author/script/allabout.asp) An ASP You Can Grasp: The ABCs of Active Server Pages http://msdn.microsoft.com/workshop/server/asp/ASPover.asp (http://msdn.microsoft.com/workshop/server/asp/ASPover.asp) ASP Conventions http://msdn.microsoft.com/workshop/server/asp/aspconv.asp (http://msdn.microsoft.com/workshop/server/asp/aspconv.asp) COM Objects in ASP http://msdn.microsoft.com/workshop/server/asp/comtutorial.asp (http://msdn.microsoft.com/workshop/server/asp/comtutorial.asp)
4GuysFromRolla Microsoft
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.http://www.4guysfromrolla.com/ (http://www.4guysfromrolla.com/) 15Seconds.com http://www.15seconds.com (http://www.15seconds.com) ASP101.com http://www.asp101.com (http://www.asp101.com) ASPToday http://www.asptoday.com/ (http://www.asptoday.com/) ASPWire http://www.aspwire.com/ (http://www.aspwire.com/) LearnASP http://www.learnasp.com (http://www.learnasp.com) W3Schools.com http://www.w3schools.com (http://www.w3schools.com) Microsoft ASP.NETMicrosoft ASP.NET is build on .NET technology and has many advanced features. For more information about ASP.NET, visit the following Microsoft Developer Network (MSDN) Web site:http://msdn.microsoft.com/net/aspnet/default.asp
(http://msdn.microsoft.com/net/aspnet/default.asp)
|