473,513 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET Tracing problems!

Hello All.

Could you plase help me to configure tracing in Asp.Net application.
I use Win2ksp4, .Net 1.1 (+ all latest patches for .Net 1.1 an for Windows).
I faced with stable error. On first access to the site it said:
===quote:begin===
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: Exception in configuration section handler.
Source Error:
Line 82: </appSettings>
Line 83:
Line 84: <system.diagnostics>
Line 85: <switches>
Line 86: <add name="traceLevel" value="0" />
Source File: c:\inetpub\wwwroot\AmbianceWebNH\web.config Line: 84
===quote:end===
Nov 19 '05 #1
2 1246
sorry. I pressed Ctrl+Enter by mistake... :-)

I give you more detail about the issue.
My web.config file contains lines:

<system.diagnostics>
<switches><add name="traceLevel" value="0" /></switches>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:/Inetpub/wwwroot/MySite/log/_reports_trace.log"
/>
<remove type="System.Diagnostics.DefaultTraceListener"/>
</listeners>
</trace>
</system.diagnostics>

The line 84 is the line with "<system.diagnostics>".

What I want - I want to have nice tracing in my Asp.Net application.
Tracing that configured from web.config file and understands "~" in path to
log file.
For example:
<add name="myListener" type="System.Diagnostics.TextWriterTraceListener"
initializeData="~/log/_reports_trace.log" />
I mean - I do not wish to use physical path (because site location cound be
different on different servers).

Is it possible to do such thing in .Net 1.1 with standard stuff?
Or should I code my special TraceListener?

WBR,
Dmitry.
"Dmitry Bond." <db@alfa-team.com> wrote in message
news:de***********@news.kiev.sovam.com...
Hello All.
Could you plase help me to configure tracing in Asp.Net application.

[...]
Nov 19 '05 #2
Hello.

Finally I solved this problem by writing my own TraceListener that creates
TextWriter not at the moment of listener creation but on first access to it.
Also it does not stop whole site if unable to create trace log file (usually
by security reasons) and also it supports "~/" in path to trace log file.

WBR,
Dmitry.
Nov 19 '05 #3

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

Similar topics

2
1682
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,...
1
1391
by: Jim Heavey | last post by:
I am trying to understand the use of Tracing/ In the @page you can add Trace="true" which provides a page of tracing information. Where can I find some material to help me make sense of the...
0
1251
by: Paul Ibison | last post by:
HI when I have a page which calls a component I want to do the following - tracing set to false on the pag tracing set to true in the componen tracing set to false in the page after the call to...
5
1565
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
1652
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
1749
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....
3
6820
by: Tim Mavers | last post by:
Is there an easy way to turn on soap tracing of some sort for a web service? We have built a web service (in production) that is experiencing problems for a client. Is there an easy way we could...
0
1348
by: cnys | last post by:
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...
0
1317
by: rehto | last post by:
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...
0
7265
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
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7545
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...
1
7111
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...
0
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.