ASP.NET Tips: Add trace statements

So I am going to start a new topic revolving around some useful tips for ASP.NET developers.

The first one is rather simple but very effective.  When you are creating your site, it is a good idea to add some tracing to your application for times when you need to debug or troubleshoot a problem.  For example, if you are having a performance problem with a particular page, you can turn on Tracing for that page and get a detailed report of how long different steps took for the page to execute.

To use tracing on your site, take a look at: Writing Trace Messages

As you can see there, you can get how long your code took to get from one logged trace statement to the next.  This can really help you to narrow down where the bottleneck is that is causing the problem on your site.

There is a great example of this here.

If you are using IIS7, you can use tracing and get that output with your FREB log file, everything you need to set that up is located here.

kick it on DotNetKicks.com

Published 29 February 08 12:14 by Tom

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

Comments

# DotNetKicks.com said on February 29, 2008 12:16 PM:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# Jason Haley said on March 1, 2008 11:02 AM:

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

Search

This Blog

Syndication

Page view tracker