Configuring the ASP development environment in Windows 2000

Source: Internet
Author: User
Tags contains ftp ftp site iis file transfer protocol access root directory
Window|window, using ASP (Active Server page) to write personal web pages, has become a dream for more and more personal web authors. ASP is a kind of web script language, its most important characteristic is database drive and dynamic interaction. The introduction of ASP will enable your personal site to have a strong data exchange and dynamic interaction capabilities.

Turn your personal computer into a personal Web server

Perhaps a lot of friends think this is an incredible thing, in fact, it is not difficult to do, the author is based on Windows Professional as an example to illustrate the implementation method.

A useful Web application development component Iis-internet Information Service (Internet Information Service) is integrated in Windows Professional with a version of 5.0. Compared to earlier versions, the speed and security of the operation are greatly improved. Windows 2000, which contains Internet information services, is one of the easiest ways to share information and run powerful applications on the Web. IIS contains functional components such as the World Wide Web server, File Transfer Protocol (FTP) server, SMTP virtual server, ASP, Personal Web Manager (Personal Web Manager).

As long as you have IIS installed, your personal computer becomes a personal Web server. The installation method for IIS is simple, you can follow these steps: Start → control Panel → add/Remove Programs → add/Remove Windows components, and then in the Components List dialog box, select Internet Information Services, administration and monitoring tools, and Script Debugger. Clicking on the "OK" button on the Windows Components dialog box, Windows Professional will automatically start installing and configuring IIS.

After IIS is installed, you will find three more icons in Administrative tools in Control Panel, namely Internet Services Manager, Personal Web server (Personal Web server), and server externsions. Through them, you can manage and control your personal Web server.

• Set the IP address of a personal Web server

Double-click the Internet Service Manager icon to enter the Service Manager dialog box. You will see that there is a default FTP site, Default Web site, and a default SMTP virtual server under the computer identifier.

Select the Web site, press the right mouse button, select Properties from the pop-up menu, go to the Properties dialog box and select the Web site option, and then click the IP Address Drop-down box and select "127.0.0.1" as the IP address for the Web site. In this way, you can access the Web site on this computer by typing "http://LocalHost/" or "http://127.0.0.1/" in IE browser.

• Set personal web Manager shortcuts

Double-click the Personal Web server icon to see a dialog box like Figure 1 that describes information about your Web server.


Figure 1 Person Web Manager dialog box

Figure 1 shows the physical storage location of the Web site as the C:\Inetpub\WWWRoot directory on this computer, its active status is started (meaning accessible), and displays the monitoring information associated with the current Web site.

Because it is important to use Personal Web Manager to start and shut down a Web site frequently during the debugging of an ASP program, it is necessary to display the Personal Web Manager in the taskbar and create a quick way into the personal Web Manager. Set the steps as follows: From the Control Panel to the Personal Web Manager, select the "Show taskbar icon" option in the Properties menu. This way, each time you enter Windows, the Personal Web Manager shortcuts are displayed in the taskbar, and you can double-click the shortcut icon to quickly enter your personal Web Manager.

Well, so far, you've got access to your IP address for 127.0.0.1 Web site. Start IE and type http://127.0.0.1 in the address bar to see what happens.

Setting up a virtual directory

When IIS starts Localstart.asp, you will see that another pop-up window displays the Help documentation for IIS 5.0. Now, you already have a configuration environment running an ASP program.

What are we going to do next? Do you want to create a directory on your Web site that stores ASP programs? How to do it?


Figure 2 Adding a Web site virtual directory

We first create a subdirectory of the C:\Inetpub\WWWRoot under the physical root directory of the Web site through a resource browser (or you can build a physical directory elsewhere). Then enter the Personal Web Manager, click the "Advanced" button on the dialog box, select the "Home" virtual directory in the Virtual directory list box of the virtual directory group, and then click the "Add" button to enter the Add Virtual Directory dialog box.

At the top right of the add virtual directory there is a "Browse" button, click the button, in the subsequent pop-up "Browse folder" dialog box, select the samples you have just established, press the "OK" button. The complete physical path to the Samples directory is displayed in the Catalog edit box of the Add Virtual Directory dialog box (see Figure 2). Set the alias for this virtual directory to Asp-dev, set its access license to read, and the application license to script. Click on the "OK" button, so that the virtual directory settings under your Web site are complete. Later, you can access the ASP page in IE browser via "IP address + virtual directory alias" (Note: not the physical path of IP address + virtual directory).


Figure 3 The results of the hello.asp operation

For example, to access an ASP page in the directory, you should type http://127.0.0.1/asp-dev/in the IE browser address bar instead of http://127.0.0.1/samples/.

Run your first ASP program

Well, we can now write an ASP page and run it on this machine. Let's start with the simplest ASP program, "Hello World." Paste the following ASP code into a notepad program as a Windows attachment, and save it as a hello.asp, stored in the Samples directory.

<%@ Language=vbscript%>
<HTML>
<BODY>
<% for i = 3 to 7%>>
<font size=<% = i%>>
Hello world! <BR>
</FONT>
<% Next%>
</BODY>
</HTML>
Start IE browser, type Http://127.0.0.1/asp-dev/hello.asp,IE in the address bar to display a "Hello world!" from top to bottom, and the font is enlarged in turn The page of the typeface, the display effect see Figure 3. Now, do you want to try it too?



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.