In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to use Web applications in ASP.NET". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's ideas to study and learn how to use Web applications in ASP.NET.
The simplicity of design and implementation and the high efficiency of stateless connection are very important reasons for the success of HTTP protocol. In order to strike a balance between stateless HTTP requests and stateful client operations, the concept of server-side session (Session) came into being. After the client connects to the server, a client session is generated and maintained by the Web server; when the client connects to the server again through the stateless HTTP protocol, the server associates the client to a session based on certain credentials submitted by the client, such as Cookie or URL parameters. This idea has been widely used in various development languages and development environments.
In ASP.NET, Web applications and session state are maintained respectively, separating Web application functions from session functions through HttpApplication and HttpSessionState. The application layer logic is implemented in the Global.asax file and compiled into an instance of System.Web.HttpApplication at run time; the session, as a separate System.Web.SessionState.HttpSessionState instance, is maintained by the server for each user session and accessed through the Session property of the System.Web.UI.Page object subclass compiled into the ASP.NET page.
When ASP.NET processes the client request, it first generates a System.Web.HttpContext object according to the client environment and passes this object as the execution context to the subsequent page to execute the code.
We can see that before processing the page request, HttpRuntime constructs the HttpContext object according to the environment given in HttpWorkerRequest, and takes the secondary object as a parameter to get the available application from the application pool. The brief code is as follows:
The following is the program code:
Private void HttpRuntime.ProcessRequestInternal (HttpWorkerRequest wr) {/ / construct the HTTP call context object HttpContext ctxt = new HttpContext (wr, 0); / /... / / get the current Web application instance IHttpHandler handler = HttpApplicationFactory.GetApplicationInstance (ctxt) / / call handler to actually handle page requests} Thank you for your reading. The above is the content of "how to use Web applications in ASP.NET". After the study of this article, I believe you have a deeper understanding of how to use Web applications in ASP.NET, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.