In the past ASP, when a *. ASP page file is requested, this httprequest will first be intercepted by an inetinfo.exe process, which is actually a www Service. After interception, the request is forwarded to the asp. dll process, which interprets the asp page and then returns the interpreted data stream to the client browser. In fact, ASP. DLL is an ISAPI file attached to IIS. It is responsible for interpreting and executing files such as ASP files and ASA.
ASP. NET framework
When the client requests a *. aspxpage file from the web server, the HTTP request will also be intercepted by the inetinfo.exe process (www Service). After determining the file suffix, the request is forwarded to ASP. NET_ISAPI.DLL and ASPNET_ISAPI.DLL send this Http request to ASP through an http PipeLine. NET_WP.EXE process. When the HTTP request enters the ASPNET_WP.EXE process, ASP. NET framework will process this Http request through HttpRuntime and return the result to the client after processing.
After an http request is sent to HttpRuntime, the request will be sent to a container called HttpApplication Factory, the container will provide an HttpApplication instance to process the passed http requests, and then the Http requests will enter the following containers in sequence:
HttpModule --> HttpHandler Factory --> HttpHandler
After the HttpHandler's ProcessRequest method in the system is processed, the entire Http Request is processed and the client obtains the corresponding information.
Complete http request processing process in ASP. NET framework:
HttpRequest --> inetinfo.exe-> Pipeline --> Http Pipeline --> ASPNET_WP.EXE --> HttpRuntime --> HttpApplication Factory --> HttpApplication --> HttpModule --> HttpHandler Factory --> HttpHandler. processRequest ()
If you want to intercept an httpRequest in the middle and perform some processing on your own, you should implement this internally during the HttpRuntime runtime, specifically in the HttpModule container.
The system's HttpModule implements an IHttpModule interface. Of course, our own class can also implement the IHttpModule interface, which can replace the system's HttpModule object.
- Introduction to ASP. net mvc implementation
- How to send emails from ASP. NET 2.0
- Introduction to ASP. NET Applications
- ViewState nature in ASP. NET
- Installing ASP. NET AJAX