C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

Tracing


Posted Date: 25 May 2006    Resource Type: Articles    Category: .NET Framework
Author: Sukanya Member Level: Diamond    
Rating: 1 out of 5Points: 5



Tracing is a technique for recording events, such as exceptions, in an application. There have always been ways to record errors in an application—usually by opening a file and writing error messages to it—but tracing offers these significant advantages:

Standardization
Building tracing into the .NET Framework ensures that programming techniques are the same across all the applications you develop with the .NET Framework.

Built-in Web support
ASP.NET extends the .NET Framework tools by including information related to the performance and behavior of Web requests.

Configuration
You can turn tracing on and off using settings in your application’s configuration file. You don’t have to recompile your application to enable or disable tracing.

Performance
While disabled, tracing statements do not affect application performance.

To use tracing in a Web application, follow these steps:

Turn tracing on.

Write to the trace log.

Read the trace log.

The following sections provide details on these three steps.

Turning Tracing On and Off
Tracing can be turned on or off for an entire Web application or for an individual page in the application:

To turn tracing on for an entire application, in the application’s Web.config file, set the element’s Enabled attribute to True.

To turn tracing on for a single page, set the DOCUMENT object’s Trace property to True in the Visual Studio .NET Properties window. This sets the @ Page directive’s Trace attribute to True in the Web form’s HTML.
The element also includes a RequestLimit attribute to specify how many page requests to write to the trace log. For example, the following line from a Web.config file turns on tracing for the application and writes the first 20 requests to the Trace.axd file:








Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Deployment Steps for Windows Application
Previous Resource: Interview Question (.Net Framework)
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use