What is httpcontext.

Source: Internet
Author: User
Here is msdn's description of httpcontext:
Httpcontext class: encapsulate all http-specific information about individual HTTP requests.
(The Internet says context information. What is context? I am not clear about it)
This is an msdn remark:
Provides Httpcontext Object reference. This object provides access to the internal request, response, and server attributes of the request.
You can click this link to view the msdn httpcontext class, including instructions and usage.

As a result, the Internet is crazy to search (it is good to have a network .)
This Is My added httpcontext class:
1. lifecycle : starts when a client user clicks and generates a request to the server. The server processes the request and generates a response to the client.
Note: For requests from different users, the server creates a new httpcontext instance until the request ends and the server destroys the instance.
2. why is there an httpcontext class? . in the Code of the ASP page, request, respose, server, and other http-specific information are used. but in ASP. in the "Net" era, this method can no longer satisfy applications. (for example, when we want to process requests in the ihttpmodule, how can we get them? As a result, the httpcontext class is generated, which encapsulates requests, respose, server, and so on, and ensures that requests can be called anytime, anywhere throughout the request cycle .)
3. special : Of course, httpcontext only supports this function. ASP. it also provides many special functions. for example, cache. httpcontext. item, through which you can store some temporary data in advance during the lifecycle of httpcontext for convenient use at any time. for details, refer to the content provided by the above msdn.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.