TAILIEUCHUNG - Beginning ASP.NET 1.1 with Visual C# .NET 2003 phần 2

HTTP được biết đến như là một giao thức không quốc tịch. Điều này là bởi vì nó không biết liệu các yêu cầu đã được thực hiện là một phần của một thư liên tục hoặc chỉ là một tin nhắn duy nhất (giống như cách người đưa thư của bạn sẽ không biết liệu một lá thư là lần đầu tiên từ một người bạn của bạn hoặc thứ mười lăm) | Server Controls and Variables HTTP is known as a stateless protocol. This is because it doesn t know whether the request that has been made is part of an ongoing correspondence or just a single message just the same way your postman won t know whether a letter is the first from your friend or the fifteenth . HTTP is stateless because it was only intended for the simple task of retrieving pages for display. The Internet would be very slow and might even collapse if permanent connections states needed to be maintained between clients and servers as people moved from one page to another. Statelessness makes the Internet faster but the downside is that HTTP by itself can t distinguish between different users. A Web server based on pure HTML will treat all requests with the same status that of an unknown user. Obviously the modern needs of the Internet require that you can identify users and track their moves through the various pages needed for accomplishing a task on a Web site. As seen later in the book creates a state that can be used by programmers. Where Fits in with the .NET Framework adds a step to the request-response mechanism after the server receives the request it reads the page from the hard drive. But rather then containing just text and HTML tags an page also contains script that is interpreted to build features into the page. Figure 3-2 The process is illustrated in Figure 3-2 and can be explained as follows 1. The client requests a Web page by typing an URL into the browser and clicking GO. 2. Web server locates on its hard drive the page that was requested. 63 Chapter 3 3. If the name of the Web page has an .aspx extension the server processes the page - it runs the script code. If the code hasn t been compiled before it is compiled now. The code is executed to create a pure HTML stream. 4. The HTML stream is returned to the client. 5. The client browser interprets converts the HTML code and text into a .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.