Programming | server | Server declaration: ASP Programming Entry Advanced series article copy from http://www.cnbruce.com/blog/part run code please go to the station for online testing
Introduction to ASP Programming (i): Installing a configuration server
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, ie,ns,te or Myie, as long as you can browse the Web browser, in its address bar input:
http://localhost/view can be. 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.
Typing in the inside
<%=now ()%>
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?
Open Administrative Tools from the Control Panel
Select Internet Service Manager from
12, the pop-up window in the right mouse button "new"-"virtual directory."
13, eject the Virtual Directory Creation Wizard.
Next, fill in the alias: Myasp.
Next, directory: Browse to E:\myasp.
Immediately after the access to the permissions must be "read" and "Run Script" tick.
Finally click "Finish".
14, the results are as follows:
15, then the rest is debugging the time.asp.
Right-click time.asp in Internet Information Services and choose Browse.
16, the final page is as follows:
17, Look! As simple as that, you've got an ASP primer.