SharePoint [debugging, diagnostics error series]-Use of developer dashboard (4. display ASP. NET tracing information)

Source: Internet
Author: User
In the previous SharePoint version, because developer dashboard was not displayed, the use of ASP. NET tracing information became one of the important methods for Sharepoint developers to debug and diagnose. With the developer dashboard, we can still integrate the tracing information of Asp.net into the developer dashboard.
ASP. NET tracing contains the following information:
• Event tracking and execution time information
• Control tree and related information
• Session and cookies
• The header and form of the page and passing parameters ......
Some information presented by Asp.net tracing overlaps with developer dashboard, but some information (such as the parameters that form passes to the page) can only be seen in Asp.net tracing.
You can use the following code to enable ASP. NET tracing.

Spdeveloperdashboardsettings settings = spwebservice. contentservice. descridashboardsettings;
Settings. displaylevel = spdeveloperdashboardlevel. on;
Settings. traceenabled = true;
Settings. Update ();

The above code is actually usedSpdeveloperdashboardset.pdfA Property of a class --TraceenableWhen it is set to true, Asp.net tracing is enabled.
We can develop a webpart Based on administrator CENTREL of SharePoint, embed the above Code in this webpart, and execute it to achieve our goal.
After enabling Asp.net tracing, the effect is as follows:

 

Spdeveloperdashboardset.pdfClass has other attributes. For details, see (spdeveloperdashboardsettings). The important attributes include:

Maximumcriticaleventstotrack, maximumsqlqueriestotrack, requiredpermissions. In the previous SharePoint version, because developer dashboard was not displayed, the use of ASP. NET tracing information became one of the important methods for Sharepoint developers to debug and diagnose. With the developer dashboard, we can still integrate the tracing information of Asp.net into the developer dashboard.
ASP. NET tracing contains the following information:
• Event tracking and execution time information
• Control tree and related information
• Session and cookies
• The header and form of the page and passing parameters ......
Some information presented by Asp.net tracing overlaps with developer dashboard, but some information (such as the parameters that form passes to the page) can only be seen in Asp.net tracing.
You can use the following code to enable ASP. NET tracing.

Spdeveloperdashboardsettings settings = spwebservice. contentservice. descridashboardsettings;
Settings. displaylevel = spdeveloperdashboardlevel. on;
Settings. traceenabled = true;
Settings. Update ();

The above code is actually usedSpdeveloperdashboardset.pdfA Property of a class --TraceenableWhen it is set to true, Asp.net tracing is enabled.
We can develop a webpart Based on administrator CENTREL of SharePoint, embed the above Code in this webpart, and execute it to achieve our goal.
After enabling Asp.net tracing, the effect is as follows:

 

Spdeveloperdashboardset.pdfClass has other attributes. For details, see (spdeveloperdashboardsettings). The important attributes include:

Maximumcriticaleventstotrack, maximumsqlqueriestotrack, requiredpermissions.

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.