473,396 Members | 1,766 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,396 software developers and data experts.

ASP.NET Application - Tracing Doesn't Work

We have an ASP.NET 2.0 (C#) app and we want to enable tracing (see the code
snippets below).

The first time a user navigates to the app., the tracing works fine (the
ASP.NET tracing appears on the screen and writes to a text file). The
problem happens any subsequent time the app. is used--tracing doesn't
happen. It's as if tracing just turns itself off. So, we only get tracing
on the first time the app runs but never any other time.

Has anyone ever seen this?
What could we be doing wrong?
Any suggestions on how to fix?

Web.config
<system.web>
...
<trace enabled="true" pageOutput="true" writeToDiagnosticsTrace="true"/>
</system.web>
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="WebPageTraceListener" type="System.Web.WebPageTraceListener,
System.Web, Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
<add name="TextWriterTraceListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="D:\Temp\TraceFiles\Application_Tra ceFile.log"/>
</listeners>
</trace>
</system.diagnostics>

Default.aspx (no UI/no HTML, only code-behind)
protected void Page_Load(object sender, EventArgs e)
{
// Do some stuff
Trace.Write("category", "message");
Response.Redirect("Next.aspx", true);
}

Next.aspx (no UI/no HTML, only code-behind)
protected void Page_Load(object sender, EventArgs e)
{
// Do some stuff
Trace.Write("category", "message");
Response.Redirect("TheRealStartPage.aspx", true);
}

TheRealStartPage.aspx (this page has HTML and code-behind)
protected void Page_Load(object sender, EventArgs e)
{
// Do some stuff
Trace.Write("category", "message");
}

May 31 '06 #1
0 1307

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,...
0
by: Jay Pondy | last post by:
While logging or tracing an application I frequently need to know where the code is executing - the class.method name. One way to obtain this information is: Me.GetType.Name & "." &...
0
by: carbon_dragon | last post by:
The application is a console app, though it does have a temporary windows form console, which is fairly complicated and which was developed in VS2003. I installed VS2005 on an XP OS and tried to...
1
by: Jodi Wedll | last post by:
I am attempting to deploy my .Net Application from my WinXP development machine to production systems based upon WinNT and Win98. I believe that it is mostly working except for code relating to the...
5
by: Dabbler | last post by:
When I first start up an ASP.NET application with tracing enabled in web.config the first few pages show trace at bottom of the page but then at some point the pages return to normal with no trace...
6
by: TPI | last post by:
I wrote application wich i working on IntPtr. Whole thing is using Marshal.ReadInt32 and Marshal.WriteInt32. And sometimes the application shuts down with out any wornings and exceptions. With...
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)?
3
by: Dick | last post by:
How do I integrating ASP.NET Tracing with the Enterprise Library Logging Application Block? I guess this should be possible and in a similar way to the way ASP.NET Tracing is integrated with...
0
by: GB | last post by:
All, There's a few messages around about the Environment.GetResourceString causing a "Resource lookup failed - infinite recursion detected." error but nothing detailed. I have a problem...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.