Trace of ASP. NET

Source: Internet
Author: User

Author: zfive5 (zhaozidong)
Email: zfive5@yahoo.com.cn

After turning over "Aspx. Net advanced programming" in the afternoon, I have another impulse to write. Such a good function should be known to more people. In. add <% @ page trace = "true" %> to the aspx file, and then execute the aspx file. You will see more information in the original interface, request details, tracking information, control tree, Cookie set, header set, and server variables.

Aspx code:

Private void page_load (Object sender, system. eventargs E)
{
// Place user code here to initialize the page
Trace. Write ("trace1 ");
Trace. Warn ("warn1 ");
Trace. Write ("trace2 ");
}


The trace information section after execution is as follows:

CATEGORY message from first (s) from last (s)
Aspx. Page begin init
Aspx. Page end init 0.001612 0.001612
Trace1 0.002763 0.001150

Warn1 0.003155 0.000393

Trace 2 0.003240 0.000085

Aspx. Page begin prerender 0.003287 0.000047
Aspx. Page end prerender 0.003331 0.000044
Aspx. Page begin saveviewstate 0.003636 0.000305
Aspx. Page end saveviewstate 0.004491 0.000856
Aspx. Page begin render0.004559 0.000068
Aspx. Page end render 0.051202 0.046643

Yes, even the execution time is output.

Look at the cookie information output by the trace, and then look at the session ID. The value is the same. It seems that the session of Asp.net is implemented by Cookie!

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.