473,465 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Trace-Problem

Hi!

I want to send a mail with the trace-information from the Global.asax.cs
(Application specific error handling). I have no idea how to get this
information. There is no sth. like Trace.ToString() :)

Can anybody help me?

- Thomas

P.S. I am using ASP.NET v1.1
Oct 1 '07 #1
2 1399
You need to first retrieve the Trace information yourself, by making
your own listener class which inherits from
System.Diagnostics.TraceListener and registering it in Web.config:

<system.diagnostics>
<trace autoflush="true">
<listeners>
<add name="..." type="..." />

You have to write to it programmatically using
System.Diagnostics.Trace.Write() and you can get the pages to write to
it automatically with the following in Web.config:

<system.web>
<trace writeToDiagnosticsTrace="true" enabled="true" />

Turning it on:
#define TRACE
or (for VB)
#Const TRACE=True

-Michael Placentra II
On Oct 1, 9:59 am, Thomas Partsch <tho...@thomepage.dewrote:
Hi!

I want to send a mail with the trace-information from the Global.asax.cs
(Application specific error handling). I have no idea how to get this
information. There is no sth. like Trace.ToString() :)

Can anybody help me?

- Thomas

P.S. I am using ASP.NET v1.1
Oct 2 '07 #2
Hi!

Thanks for your answer. But as far as I know, this is only applicable to
ASP.NET 2.0. I only use 1.1 and there is no way to migrate to 2.0 at the
moment.

- Thomas

Mike Placentra II schrieb:
You need to first retrieve the Trace information yourself, by making
your own listener class which inherits from
System.Diagnostics.TraceListener and registering it in Web.config:

<system.diagnostics>
<trace autoflush="true">
<listeners>
<add name="..." type="..." />

You have to write to it programmatically using
System.Diagnostics.Trace.Write() and you can get the pages to write to
it automatically with the following in Web.config:

<system.web>
<trace writeToDiagnosticsTrace="true" enabled="true" />

Turning it on:
#define TRACE
or (for VB)
#Const TRACE=True

-Michael Placentra II

Oct 2 '07 #3

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

Similar topics

2
by: Ken | last post by:
I would like to start using EventLogTraceListener, and am running into a couple of significant limitations: 1) I have found that there is no way to write EventLog entries with different...
9
by: svenn.are | last post by:
Hi, has anybody thought of / already used graphviz to convert the output of trace.py into a graph? I looked at PyUMLGraph, but 1. PyUMLGraph does not successfully create a dot file, and 2. I...
2
by: Wilfried Hoermann | last post by:
Presumably a trivial question... I want to write trace information from a web service to a log file using the Trace Class. Is this possible without closing and opening the Trace in every single...
5
by: martin | last post by:
Hi, The trace class seems to me to be very usefull however there are a few features of it that have to confused. I am using visual studio 2003. the IDE will not let me write ...
5
by: cameron | last post by:
I have attempted to lock down the trace.axd file with the standard: <location path="trace.axd"> <system.web> <authorization> <allow roles="SOME GROUP"/> <deny users="*"/> </authorization>...
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...
9
by: Joe Rattz | last post by:
I can't seem to get to trace.axd. I have turned tracing on in web.config. Here is how I currently have i configured: <trace enabled="true" requestLimit="10" pageOutput="false"...
1
by: Patrick | last post by:
When Tracing in ASP.NET, the IIS process (on IIs5.1) is locking on the Trace file, and I can't read the trace file without restarting the IIS: Even the following does NOT work (how could I fix...
0
by: =?Utf-8?B?YWtz?= | last post by:
I've configured Trace switch in my app.config file: DebugLevel = new TraceSwitch("DebugLevel", "Trace Level for Entire Application"); and have created and initialized a trace listener in my...
2
by: tshad | last post by:
I have a page with Trace.Warns statements in my Page_Load and functions that it calls, but it doesn't seem to work in a class that is defined on the same page. I am writing this in C# I am...
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
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...
1
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
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.