473,320 Members | 1,829 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,320 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 1301

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: 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: 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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.