In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what is the ASP.NET operation and analysis request process". In the daily operation, I believe that many people have doubts about the ASP.NET operation and analysis request process. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "what is the ASP.NET operation and analysis request process?" Next, please follow the editor to study!
Netinfo.exe process: is the process of the www service, where both the IIS service and ASPNET_ISAPI.DLL are hosted.
ASPNET_ISAPI.DLL: it's processing. The win32 component of the aspx file. In fact, the IIS server can only recognize. Html file, when the IIS server finds that the requested file is. When the aspx file is created, the IIS server hands it over to aspnet_isapi.dll for processing.
Aspnet_wp.exe process: ASP.NET framework process, provided. The managed environment in which net runs. Net's CLR (common language runtime) is hosted in this process.
ASP.NETFramework handles the flow of a HttpRequest:
HttpRequest-- > inetinfo.exe-- > ASPNET_ISAPI.dll-- > ASPNET_WP.exe-- > HttpRuntime-- > HttpApplicationFactory-- > HttpApplication-- > HttpModule-- > HttpHandlerFactory-- > HttpHandler-- > HttpHandler.ProcessRequest ()
The process of ASP.NET request processing is based on the pipeline model, which is composed of multiple HttpModule and HttpHandler. ASP.NET passes the http request to each HttpModule in the pipeline in turn, and finally it is processed by HttpHandler. After the processing is completed, it goes through the HTTP module in the pipeline and returns the result to the client. We can interfere with the processing of requests in each HttpModule.
Note: during the processing of a http request, only one HttpHandler can be called, but multiple HttpModule can be called.
When the request arrives at HttpModule, the system has not really processed the request, but we can attach some other information before the request is passed to the processing center (HttpHandler), or intercept the request and do some extra work, or terminate the request, etc. After the HttpHandler has processed the request, we can reprocess the result of the request processing in the corresponding HttpModule and return it to the client.
How does ASP.NET operate and analyze the request process
HttpModule
The HTTP module is a class that implements the System.Web.IhttpModule interface.
Declaration of the IHttpModule interface:
? publicinterfaceIHttpModule
? {
? voidInit (HttpApplicationcontext)
? voidDispose ()
?}
Init method: called automatically when the system initializes, this method allows the HTTP module to register its own event handler with events in the HttpApplication object.
Dispose method: this method gives the HTTP module the opportunity to perform cleanup before the object is garbage collected. This method generally does not need to write code.
The HTTP module can register the following series of events with the System.Web.HttpApplication object:
AcquireRequestState raises this event when the ASP.NET runtime is ready to receive the conversation status of the current HTTP request.
AuthenticateRequest raises this event when the ASP.NET runtime is ready to authenticate the user.
AuthorizeRequest raises this event when the ASP.NET runtime is ready to authorize users to access resources.
BeginRequest raises this event when a new HTTP request is received by the ASP.NET runtime.
Disposed raises this event when the ASP.NET finishes processing the HTTP request.
This event is raised before EndRequest sends the response content to the client.
This event is raised by Error when an unhandled exception occurs during the processing of the HTTP request.
PostRequestHandlerExecute raises this event when the HTTP handler finishes execution.
PreRequestHandlerExecute raises this event before ASP.NET starts executing the handler for the HTTP request. After this event, ASP.NET forwards the request to the appropriate HTTP handler.
PreSendRequestContent raises this event before the ASP.NET sends the response content to the client. This event allows us to change the response content before it reaches the client. We can use this event to add content for all pages to the page output. For example, general menu, header information, or foot information.
PreSendRequestHeaders raises this event before ASP.NET sends the HTTP response header information to the client. This event allows us to change the contents of the header message before it reaches the client. We can use this event to add cookie and custom data to the header information.
ReleaseRequestState raises this event when the ASP.NET finishes the execution of the searched request handler.
ResolveRequestCache We raise this event to determine whether the request can be terminated with the content returned from the output buffer. This depends on how the output buffering of the Web application is set.
UpdateRequestCache raises this event when the ASP.NET has finished processing the current HTTP request and the output is ready to be added to the output buffer. This depends on how the output buffer of the Web application is set.
At this point, the study of "what is the process of ASP.NET operation and analysis request" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.