Server-side processing in ASP dynamic pages

Source: Internet
Author: User

In terms of server processing, ASP is a relatively new technology for generating dynamic web pages. What does dynamic pages mean? For the moment, we will not consider the progress of client-related functions, nor discuss client scripts, Java applets, dynamic HTML or ActiveX controls. The dynamic page here refers to the page generated by the server in response to the client request, and the page may be different each time according to the situation.

A simple example is to create a page that only contains the current date and time. Each request to this page will display a different value, because the date and time depend on the server clock, or it depends on a resource that provides the date and time (for example, an independent server or a standard clock from the Internet ). Of course, in fact, dynamic pages are much more complex than this. It may display the current value of the database record or the digest of the mail message waiting on the email server. The important thing is that the server not only reads a non-formatted HTML page, or text files on the disk and sends them to the customer, but also has to do some work to create the page.

Internet Server Application Programming Interface

The traditional technology uses an interface with the Web server. It is called the Internet Server Application Programming Interface (ISAPI ).

ISAPI can be used to execute other applications that read client request values and create Web server responses using C-language stdin and stdout data stream functions. All that ISAPI applications must do is write the text and HTML of the corresponding result page and output it to the Web server through the stdout function. In fact, what asp dll actually does is more object-oriented.

IIS runs the ISAPI application and script interpreter from the beginning. It provides a special interpreter dynamic link library that provides another method for accessing server requests and responses, despite some restrictions. It is implemented by using commands on the server side because they are executed on the server and the results are included in the response sent to the client. This feature is implemented through a dynamic link library named ssinc. dll in IIS. By default, IIS maps any page with the file extension. shtml,. shtm, or. STM to this dynamic link library. Open the Properties dialog box of the default web site, and click Configuration in application setting to view the ing.

In this way, pages with these mapped file extensions will be transferred to ssinc. DLL for processing. Therefore, execute all the server-side statements on the page and insert the results (if any) to the server's response, that is, to the page received by the client.

Because these files are mapped to ssinc. DLL file instead of ing to ASP dynamic link library (Asp. DLL), so all ASP code in these pages will be ignored and transmitted to the client according to the original status, the client will be able to see these scripts. However, there is a method in ASP 3.0 to avoid this problem. Later, we will study this method when discussing the execute and transfer methods of server objects.

 

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.