Do not forget ASP. NET tracking mode

Source: Internet
Author: User
Tags rfc

I. ASP. NET tracking mode

1. Introduction

When it comes to the ASP. NET tracking mode, it cannot be left alone with ASP programs. In ASP, the current values of some variables are displayed on the web page. response is often used. write, which is indeed a good solution in ASP program, but because ASP. net operating mechanism.. net. The problem always needs to be solved, Asp. NET introduces a new function that allows you to write debugging statements directly in code, so you do not need to remove the applications from the application when deploying them to the production server. This function is called tracking. It allows you to write variables or structures on the page, determine whether a condition is met, or trace the data only through the execution path of the page or application. To collect and display these messages and other trace information, you must enable page or application tracing, that is, set the trace attribute to true in the @ page command. The default value is false.

2. What will happen when tracing is enabled?

When tracing is enabled, ASP. NET will do two important tasks for us:

(1) ASP. NET adds a series of diagnostic information tables to the output page. This information is also sent to the tracing Viewer application (only when tracing for the application is enabled ).

(2) ASP. NET displays custom diagnostic messages in the trace information table of append performance data. The specified diagnostic information and tracing message are appended to the page output sent to the requesting browser. Alternatively, you can view this information in a separate trace. axd, which displays the trace information for each page of a given application. When ASP. NET processes page requests, this information helps identify errors or unwanted results.

The trace statement is processed and displayed only after the trail is enabled. You can control whether to display a trail to a page, to a trace viewer, or to both a page and a trace viewer.

3. ASP. NET tracking information

You can view the append trace information at the end of the ASP. NET page or in the trace viewer. In both cases, the information displayed is the same. ASP. NET organizes tracing information in a series of tables. The trace information is displayed in the following order:

(1) request details

The "request details" section displays general information about the current request and response.
 

Value

Description

Session ID

Specifies the session ID of the request.

Request time

The time when the request was sent.

Request Encoding

The character encoding of the request.

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 (W3C) web site.

Response Code

The character encoding of the response.

 

(2) Tracking Information

The "trace Information" section displays page-level event streams. If a custom trace message is created, the message is displayed in the "trace Information" section.

Value

Description

Category

Or The custom trace category specified in the method call (if any ).

Message

Or The custom trace message specified in the method (if any ).

Time (in seconds) since the first trace statement)

The running time (in seconds) since the first trace message is processed ). The first trace message is displayed at the top of the list.

Time (in seconds) since the last trace statement)

The 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 ASP. NET Server controls created on the page.

Value

Description

Control ID

Control ID. If ASP. NET Property generation .

Type

Type of the control.

Display size Byte Count

The size (in bytes) of the displayed control (including child controls ). This is the actual size of HTML, XML, or other formats sent to the browser.

Viewstate size Byte Count

The size (in bytes) of the view status (excluding the child control) of the control ).

ControlState size Byte Count

The size (in bytes) of the control status (excluding child controls ).

(4) session Status

The session Status section displays information about the values stored in the session Status (if any.

Value

Description

Session Key

The key of the data stored in the session State (if any ).

Type

The type of the object that stores data.

Value

String Representation of the data stored in the session State (if any ).

(4) Application Status

The Application Status section displays information about the values stored in the application status (if any.

Value

Description

Application key

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

Type

The type of the object that stores data.

Value

String representation of data stored in the application state (if any.

(5) Cookie set

The "Request cookie" and "response cookie" sections show information about the cookies transmitted between the browser and the server for each request and response. This section displays both persistent cookies and session cookies. ASP. NET automatically creates some cookies, such as cookies for cookie-based session Status and forms authentication. For more information, see .

Value

Description

Name

The name of the cookie.

Value

Cookie value. If the cookie is a multi-value, it is a sub-item and a value.

Size

Cookie size (in bytes ).

(6) header set

The "header set" section displays information about header name/value pairs of request and response messages (providing information about the message body or requested resources. The header information is used to control the processing method of the Request Message and the Creation Method of the Response Message. For more information about HTTP headers, see RFC 2616 on the World Wide Web Consortium (W3C) web site.

Value

Description

Name

Header name.

Value

Header value.

(8) form set

The "form set" section displays name/value pairs, which are the form element values (control values) submitted by the request during the post operation (sending back ).

Value

Description

Name

The name of the form variable.

Value

The value of the form variable.

(9) querystring set

The "querystring set" section displays the value passed in the URL. In the URL, query the string information by using the question mark (?) Separated by path information. Multiple query string elements are separated by the & operator. The query string name/value pairs are separated by equal signs (=. Object Returns .

Value

Description

Name

Query the name of a string variable.

Value

Query the value of a string variable.

(10) server Variables

The "server variables" section displays the set of server-related environment variables and request header information. Object Attribute returned from the server variable .

Value

Description

Name

The name of the server variable.

Value

The value of the server variable.

To be continued ......
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.