Asp. NET tracking mode

Source: Internet
Author: User
Tags object header session id net new features variables string variable
Refer to asp.net tracking mode, must refer to ASP program. ASP program in the Web page shows the value of some variables at the time, often using Response.Write input, which is really a good solution in the ASP program, however, due to asp.net operating mechanism, this method in the ASP.net will have a lot of problems.

First, ASP. NET tracking mode

1. Introduce

Refer to asp.net tracking mode, must refer to ASP program. ASP program in the Web page shows the value of some variables at the time, often using Response.Write input, which is really a good solution in the ASP program, however, due to asp.net operating mechanism, this method in the ASP.net will have a lot of problems. Problems always have to be solved, ASP. NET introduces new features that allow you to write debug statements directly in your code, so that when you deploy your application to a production server, you do not need to remove them from your application, which is called tracing. It allows you to write variables or structures in a page, determine whether a condition is met, or simply trace through the page or application's execution path. To collect and display these messages and other trace information, you must enable tracing for the page or application, that is, set the Trace property to true in the @page directive and false by default.

2. What happens when you enable tracing

When tracing is enabled, ASP. NET is going to do two very important things for us:

(1) asp.net a series of diagnostic information tables appended to the page output immediately thereafter. The information is also sent to the trace viewer application (only when tracing is enabled for the application).

(2) asp.net displays a custom free clinic break message in the trace information table of the appended performance data. The specified diagnostics and trace messages are appended to the page output sent to the requesting browser. Alternatively, you can view the information in a separate trace viewer (Trace.axd), which displays the trace information for each page in a given application. When ASP.net processing page requests, this information can help you identify errors or do not want to
Results.

Trace statements are processed and displayed only after tracing is enabled. You can control whether a trace is displayed on a page, displayed to a trace viewer, or displayed both on the page and in the trace viewer.

3.asp.net Tracking Information

You can view the appended trace information at the end of the ASP.net page or in the trace viewer. The information displayed is the same in both cases. asp.net organizes the tracking information into a series of tables. Trace information is displayed in the following order:

(1) Request detailed information

The Request Details section displays general information about the current request and response.

  

Value

Description

Session ID

Specifies the session identity of the request.

The requested time

The time the request was made.

Request encoding

The requested character encoding.

Request type

HTTP method (Get or POST).

Status code

The status code value associated with the response. For more information, see RFC 2616 on the World Wide Web Consortium Web site (World Wide Web Consortium) website.

Response encoding

The character encoding of the response.

(2) Tracking information

The Trace Information section shows the page level event flow. If you create custom trace messages, the messages are also displayed in the Trace Information section.

Value

Description

Category

The custom trace category, if any, specified in the Warn or Write method invocation.

News

The custom trace message, if any, specified in the Warn or Write method.

Time since the first trace statement (seconds)

Elapsed time, in seconds, since the first trace message was processed. The first trace message appears at the top of the list.

Time since last trace statement (seconds)

The elapsed time, in seconds, between processing the current trace message and processing the previous trace message.

(3) Control tree

The Control Tree section displays information about the ASP.net server controls that are created in the page.

Value

Description

Control ID

The identity of the control. If the ID property of the control has not been specified, ASP.net uses the UniqueID property to generate the ID .

Type

The fully qualified type of the control.

Render size byte number

The size , in bytes, of the rendered control, including child controls. This is the size of the actual HTML, XML, or other format sent to the browser.

ViewState size of bytes

The size, in bytes, of the control's view state, excluding child controls.

ControlState size of bytes

The size, in bytes, of the control state of the control, excluding child controls.

(4) Session state

The Session state section displays information about the values that are stored in session state, if any.

Value

Description

Session key

The key, if any, of the data stored in session state.

Type

The fully qualified type of the object that stores the data.

Value

The string representation of the data stored in session state, if any.

(4) Application state

The Application Status section displays information about the values, if any, stored in application state.

Value

Description

Application keys

The key, if any, of the data stored in the application state.

Type

The fully qualified type of the object that stores the data.

Value

The string representation of the data, if any, stored in the state of the application.

(5) Cookie Collection

The request cookie and Response cookie sections display information about each request and response cookie that is passed between the browser and the server. This section displays both persistent cookies and session cookies. asp.net automatically creates cookies, such as Cookie based session state and Forms authentication. For more information, see asp.net Cookies .

Value

Description

Name

The name of the Cookie.

Value

The value of the cookie, and the subkey and value if the cookie is multi-valued.

Size

The size, in bytes, of the Cookie.

(6) Header set

The Header Collection section displays information about the header name/value pairs of the request and response messages that provide information about the body of the message or the requested resource . The header information is used to control how the request message is processed and how the response message is created. For more information about HTTP headers, see RFC 2616 on the World Wide Web Consortium Web site (Web Consortium) website.

Value

Description

Name

Name of the header.

Value

The value of the header.

(8) Form collection

The Form Collection section displays name/value pairs that display the form element values (control values) that are submitted in a request that appears during a POST operation (postback).

Value

Description

Name

The name of the form variable.

Value

The value of the form variable.

(9) QueryString Collection

The QueryString Collection section shows the values passed in the URL. In the URL, the query string information is separated from the path information by a question mark (?), and multiple query string elements are separated by A & character. The query string name/value pair is delimited by an equal sign (=). The QueryString property of the HttpRequest object returns the namevaluecollection of the query string variable.

Value

Description

Name

The name of the query string variable.

Value

The value of the query string variable.

(10) Server variables

The Server Variables section displays the collection of server-related environment variables and request header information. The ServerVariables property of the HttpRequest object returns the NameValueCollection of the server variable.

Value

Description

Name

The name of the server variable.

Value

The value of the server variable.



Related Article

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.