Subscribe to Subscribers

Online Members

AHMED
More...

Resources » .NET programming » ASP.NET/Web Applications

Tracing ASP.Net


Posted Date:     Category: ASP.NET/Web Applications    
Author: Member Level: Gold    Points: 3


Tracing appends diagnostic information and custom tracing messages to the output of the page and sends this information to the requesting browser. Optionally, you can view this information from a separate trace viewer (Trace.axd) that displays trace information for every page in an ASP.NET Web application. Tracing information can help you investigate errors or unwanted results while ASP.NET processes a page request.



Tracing



ASP.NET tracing enable diagnostic information about requested asp.net page.
Tracing Help to follow

• Page's execution path,
• Display diagnostic information at run time
• debug your application

Tracing appends diagnostic information and custom tracing messages to the output of the page and sends this information to the requesting browser. Optionally, you can view this information from a separate trace viewer (Trace.axd) that displays trace information for every page in an ASP.NET Web application. Tracing information can help you investigate errors or unwanted results while ASP.NET processes a page request.

Trace information can enable for single page and hole pages/ application level by configure the application's Web.config. Trace statements are processed and displayed only when tracing is enabled.

Code for Application Level tracing

<configuration>
<system.web>
<trace enabled="true" requestLimit="40" pageOutput="true" localOnly="false" />
</system.web>
</configuration>


Page level tracing
Add Trace="true" in @page Directives

Eg :

<%@ Page Trace="true" %>


Trace Configuration Attributes

PageOutput - true to display trace both in pages and in the trace viewer (Trace.axd); otherwise, false. The default is false.

requestLimit - The number of trace requests to store on the server. The default is 10.

localOnly - true to make the trace viewer (Trace.axd) available only on the host Web server; otherwise, false. The default is true.

Reference http://msdn.microsoft.com/en-us/library/bb386420.aspx





Did you like this resource? Share it with your friends and show your love!


Responses to "Tracing ASP.Net"
Author: Yasmin Mansoor    23 Apr 2010Member Level: Silver   Points : 1
ASP.NET tracing information can also be sent to a System.Diagnostic listener by using Web.config file:







Author: manisha    05 May 2010Member Level: Gold   Points : 0
good article and thanx for sharing with us.

-- Manisha Chaubey



Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: Easy Deploy ASP.NET Web site
    Previous Resource: Encrypt and Decript String ASP.NET
    Return to Resources
    Post New Resource
    Category: ASP.NET/Web Applications


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    ASP.Net  .  System.Diagnostics  .  Tracing  .  

    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Talk to Webmaster Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2013 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.