473,287 Members | 3,228 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Getting More Tracing Output in ASP.NET App.

We have an ASP.NET 2.0 (C#) app and we're trying to add tracing into it.
The tracing functionality within .NET is great, but when we output this to a
file, it's kind of sparse.

So, we're looking for ideas on how to get more tracing info. output to our
log file than what's currently output by calling the Write methods.
Here are some snippets of what we're thinking of:

Web.config
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="TextWriterTraceListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="D:\Temp\TraceFiles\Application_Tra ceFile.log"/>
</listeners>
</trace>
</system.diagnostics>

..aspx page
protected void Page_Load(object sender, EventArgs e)
{
Trace.Write("Web Application", "Trace test from a web application
(before call to method in class library).");

Tracing.Trace(); // Call to method in library, to get tracing info.
from a library too

Trace.Write("Web Application", "Trace test from a web application
(after call to method in class library).");
}

..cs class library
public static void Trace()
{
// Just for testing tracing from a library and an ASP.NET app
System.Diagnostics.Trace.WriteLine("Trace test from a class
library (using WriteLine).", "Tracing Class Library");
}

In the tracing log file, we get:

aspx.page: Begin PreInit

....

aspx.page: Begin Load
Web Application: Trace test from a web application (before call to method in
class library).
Tracing Class Library: Trace test from a class library (using WriteLine).
WhoAmI Web Application: Trace test from a web application (after call to
method in class library).
aspx.page: End Load

....

aspx.page: End Render

Is there any way to have the built-in tracing spit out more info. to the
file? For example, if you have tracing turned on to display at the bottom
of the web page, it generates a lot of useful info. Is there any way to get
all that info. logged to a file?

Thank you.

May 11 '06 #1
0 1337

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Trace User | last post by:
Hello, I have a design question regarding Tracing and Trace Switches. I understand that Trace Switches can be configured through an application's .config file. When a switch is instantiated,...
2
by: Richard | last post by:
Hello, I have a web application where I am doing alot of the work in a separate namespace that isn't part of a web page. I would like to be able to trace into this section of code, but because...
2
by: Damon Allison | last post by:
Hello, I am wondering if it is possible to export trace output (via trace.axd or otherwise) to a text file. I would like to search on different requests for certain conditions that are occuring...
6
by: serge calderara | last post by:
Dear all, I have an applicatin that generate a querry to an SQL server, then display results on a second webform. I try to see how tracing works, then I have notice that as soon as I...
2
by: deepukutty | last post by:
Hi all, I know tht we can do tracing in two ways.one in application level and the other is at Page level. I am able to see the details of trace either on the page itself or .../trace.axd page....
1
by: Massimo | last post by:
I've got a problem with VB.NET application tracing: together with my tracing messages I see in my output (file or debug window) a lot of rows with only a nu,ber (1, 2, 3, ...) What that means?...
3
by: asapjim | last post by:
Hi, I have a C# class that is being used by an ASP.net application. How can I include the tracing from the class in the ASP.net application's trace output (trace.axd)?
6
by: Stephen Torri | last post by:
I am trying to produce a singleton class that I can use throughout my library to write tracing information to a file. My intent was to design such that someone using the library in its debug mode...
1
by: RedLars | last post by:
Hi Does the class System.Diagnostics.Trace use a singelton ? I'm able to do this; System.Diagnostics.Trace.WriteLine("test"); However, these give compiler errors; System.Diagnostics.Trace...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.