Page #19 (Chapter 2 - IIS Applications)

Chapter 2 - IIS Applications

Visual Basic Developers Guide to ASP and IIS
A. Russell Jones
  Copyright 1999 SYBEX Inc.

So Many Requests, So Little Time
IIS handles all requests on a time-slice basis. It accepts a request, begins to service that request, and then accepts the next request. It continues to process the pending request during its time slice until that request is complete. Either the server can begin sending a response immediately, or it can cache the response until it has finished processing the entire request and then send the response all at once.
Browsers can request executable file types as well. The generic term for executable files is Common Gateway Interface (CGI) files or programs. As I explained in Chapter 1, "Visual Basic and the Web," you can use Visual Basic to create a CGI program. Here's a pseudocode model:
Read any data sent by the browser from StdIn
Process the data
Write the response to StdOut
When the requested file is an ASP file, the server handles the request slightly differently. It retrieves the file, either from disk or from the cache, then sends the file contents to the ASP engine.
The ASP engine parses the file to determine which parts are script code (code in ASP files is enclosed in percent signs and brackets, for example, <% this is code %>).
At this point, I should warn those who are thinking, "This isn't VB! I don't need to read this part!" that you really do need to read this part. VB's connection to the Web server is through the ASP engine. You have to work with the Web server through the objects exposed by ASP. Luckily, a Visual Basic WebClass exposes these ASP objects globally, so you don't have to declare them or receive them from an event call.
Because these objects are so important to Web applications built with Visual Basic, I'm going to explain each object briefly, then go through their properties, methods, and events in some detail, showing you how to use each one.



Visual Basic Developer[ap]s Guide to ASP and IIS
Visual Basic Developer[ap]s Guide to ASP and IIS
ISBN: 782125573
EAN: N/A
Year: 2005
Pages: 98

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net