Welcome to MSDN Blogs Sign in | Join | Help
Tip#100: Did you know… How to view ASP.NET trace information?

You can enable ASP.NET tracing either at an Application level or at a page level; see Tip# 77: Did you know… How to enable Page Level Tracing for your ASP.NET pages? for more information.

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.

Trace

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 statment 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” />

Anh Phan

SDET, Visual Web Developer

Posted: Friday, December 18, 2009 4:24 PM by WebDevTools

Comments

Nick said:

Good to know.  I've been using ASP.NET tracing information on the page level, but I didn't know I could configure it at the application level in the web.config.

# December 20, 2009 1:36 PM

waqas said:

didnt know about that.

thanks for the articles

# December 20, 2009 10:37 PM

Thanigainathan said:

Nice tips to note.

Thanks,

Thani

# December 22, 2009 12:00 AM

aspscript said:

how to know about asp script language.

# December 27, 2009 9:31 PM

lam seo said:

Just know today! Glad that you have a Vietnamese name!

Du Nguyen!

# January 7, 2010 1:17 AM

mì ý - pizza said:

Just notice this url thanks to your post!

# February 1, 2010 1:31 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker