Reading ASP.NET Trace Information

random

Reading ASP.NET Trace Information

ASP.Net View Trace Information


If you have enabled tracing for your application, when any page is requested, the page gathers trace information and executes any trace statements that it contains. You can view the trace output in the trace viewer. The trace viewer enables you to choose a specific request from the pages that have been requested from your application.

When you enable tracing for an application, you can display trace output in any page in the application by setting the pageOutput attribute of the trace element to true in the Web.config file.

You can enable ASP.Net tracing either at an Application level or at a page level. With the tracing enabled, you can view the trace output in a trace viewer by navigation to trace.axd from the root of your application.

For example, if the URL of your application is http://localhost:11423/Website, then the trace viewer can be accessed at http://localhost:11423/WebSite1/trace.axd

View ASP.NET Trace Information, ASP.NET Tracing Overview, Reading ASP.NET Trace Information, Tracing in ASP.NET

You can click on the “View Details” link of a requested page to see further information about that specific page. To write to the trace output, you can add the statement Trace.Write (“This is an action in my page.”) into your code.

The trace request limit and whether the most recent tracing data is kept and shown in the viewer can be specified in the web.config file as follows:

<system.web>
    <trace enabled="true" mostRecent="true" pageOutput="true" requestLimit="20"/>
</system.web>
Please leave your comments, suggestions and queries about this post in the comment sections in order for me to improve my writing skills and to showcase more useful posts. Thanks for reading! :)
Reading ASP.NET Trace Information Reviewed by Ravi Kumar on 12:11 AM Rating: 5

2 comments:

All Rights Reserved by Etechpulse © 2012 - 2017

Contact Form

Name

Email *

Message *

Powered by Blogger.