An introductory step in ASP programming

Source: Internet
Author: User
Tags aliases iis
Programming

Introduction to ASP Programming (i): Installing servers

Since ASP scripting languages are interpreted and run in server-side IIS or PWS, and can dynamically generate ordinary HTML Web pages, they are then transmitted to the client for browsing. We want to debug on this machine, that requires our personal computer to have the function of the server.

Do not see "server" three words are worried: My machine configuration So, performance so poor, is not match ah. Rest assured! With a server, is to install more software, and on their own a person to use, there is no need to worry. What about the specific software? As we've seen in "IIS or PWS", it's obvious that you can install IIS or PWS.

What is IIS? IIS is the abbreviation for Internet Information Server, which is the Web server for Microsoft's main push. What about the PWS? It is a bit old: early in WIN98, of course, there are still operating systems, PWS (Personal Web server) is the most accessible Web servers for general users: add_on\ of installation disks in Win98 The PWS installer can be found in the PWS directory. And for IIS is what we recommend, and most friends are in use, it is necessary.

1, open Control Panel
2, select Add/Remove Windows Components in Control Panel to open the window

3, click "Add/Remove Windows Components" and wait a moment. The Windows Components Wizard window appears. Tick "Choose Internet Information Services (IIS)"

4, in the Windows Components Wizard, click Next. Start the installation configuration of our server IIS.

5, waiting for the progress bar to end ... Finally, the copy file is complete and the configuration server ends accordingly.

6,iis server is installed OK, what is the use of the specific? And how to use it?
One of the first roles of IIS is to interpret and display the results of ASP Web page code. Of course, for now, your machine acts as both a server and a client, and the technology is transparent to you, and you don't need to study its principles to understand it.
Open your browser, any ie,ns,te or Myie, as long as you can browse the Web browser, in its address bar input: view can.
The current window appears to be successful: The Web service is running!

7, that's it, all right? Do you know what to do next? There's no clue, right. The effort to learn now, is to see someone else's ASP page.
What if I do it myself and debug my own ASP page?
First of all, you have to think about your ASP file always put in one place.
OK, open "My Computer", under E disk set up a "myasp" folder, after all the ASP files to temporarily put here.

8, and then, from the Start menu, program-"attachment"-open Notepad.
I'm typing inside.

9, then save the file to the E:\myasp\ folder and name it time.asp

10, a very simple ASP file on the OK, what do we do next? In a word: debugging.
How to debug? Or did you just type in our http://localhost? Obviously, it's not going to work.

That's not the point: how can I debug an ASP file in a folder I've defined myself?

Again, in a word: Use a virtual directory. So what is a virtual directory? And how do you create a virtual directory?

(Quote: To publish from a directory other than the home directory, you must create a virtual directory.) The virtual directory is not included in the home directory, but is displayed to the client browser as if it were in the home directory. The virtual directory has an "alias" for the Web browser to use to access this directory. Aliases are usually shorter than the directory's path name and are easier for users to enter. Using aliases is more secure because users cannot use this information to modify files because they do not know if the file is actually on the server. )

For beginners, the emphasis on practice, the use of more natural will understand the meaning of this passage.
In general, let me just the myasp folder with a code symbol to mark, for example, marked as myasp, then I debug as long as the input: http://localhost/myasp/time.asp can be debugged.

11, how to mark it? How do you create a virtual directory?
From the Control Panel, open Administrative Tools, from which you select Internet Services Manager

12, the pop-up window in the right mouse button "new"-"virtual directory."

13, pops up the Virtual Directory Creation Wizard.

Next, fill in the alias: Myasp.

And then Next, directory: Browse to E:\myasp.

is immediately followed by the access permissions must tick the read and run scripts.

Finally clicks "Finish".

14, the result is as follows:

15, so the rest is debugging the time.asp.
Right-click time.asp in Internet Information Services and select Browse.

16, the final page is as follows:

1 7, Look! As simple as that, you've got an ASP primer.



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.