At the beginning of the Internet era, client needs were very limited;. HtmFiles can meet their needs. However, as the time passes, the expansion required by the customer exceeds the functions contained in the .htm file or static file. Developers need to expand or expand the functions of Web servers. Web server vendors have designed different solutions, but all follow the same topic "insert certain components to Web servers ". All complementary Web server technologies allow developers to establish and insert components to Enhance Web server functionality. Microsoft proposed ISAPI (Internet Server API), and Netscape proposed NSAPI (webscape Server API.
ISAPI is an important technology that allows us to enhance the capabilities of ISAPI-compatible Web servers (IIS is a Web server compatible with ISAPI. We use the following components to achieve this goal:
· ISAPI extension
· ISAPI filter
ISAPI extensions are implemented using Win32 dynamic link libraries. You can regard ISAPI extension as a common application. The objective of ISAPI scaling is to handle http requests. This means you must call them to activate them. You can think that the ISAPI filter is just a filter. Each time the client sends a request to the server, the request goes through a filter. The client does not need to specify a filter in the request, but simply sends the request to the Web server. Then, the Web server passes the request to the related filter. Next, the filter may modify the request and perform some login operations.
The complexity of these components makes it very difficult to implement them. Developers have to use C/C ++ to develop these components, but for many people, using C/C ++ for development is simply synonymous with pain.
So what does ASP. NET provide to implement these functions?ASP. NET provides HttpHandler (HTTP handler) and HttpModule (HTTP module ).
Before learning more about these components, it is valuable to know how http requests are processed through the HTTP module and HTTP processing program.
Create a sample application
I have created the following C # projects to demonstrate different components of the application:
· NewHandler (HTTP handler)
· Webapp (demonstration of HTTP processing programs)
· SecurityModules (HTTP module)
· Webapp2 (demonstrate HTTP module)
Steps for installing these applications:
· Unlock the code in the attached zip file.
· Create two virtual directories: webapp and webapp2. Point these two directories to the actual physical directories of the Webapp and Webapp2 applications.
· Copy the NewHandler. dll file in the Newhandler project to the bin directory of the webapp.
· Copy the SecurityModules. dll file in the SecurityModules project to the bin directory of the webapp2 application.
This article first writes this, for ASP. NET in the HTTP module and the processing program in-depth analysis, the author will continue to launch the next five articles, respectively introduce ASP.. NET and the other five parts of the processing program. If you are interested, click the link to continue reading.
· ASP. net http module and process of processing program requests
· Execution of HTTP modules and processing programs of ASP. NET
· Interaction status of HTTP modules and handlers in ASP. NET
· Registration and use of HTTP modules of ASP. NET and HTTP modules of processing programs
· ASP. net http module and processing program module implementation
- Implement HTTP requests in ASP. NET
- ASP. NET Programming Model HTTP Working Principle
- High-performance ASP. NET site construction to optimize HTTP requests
- HTTP protocol analysis of ASP. NET Programming Model
- ASP. NET Operations and Analysis on the request processing process