Trace-Problem

  • Thread starter Thread starter Thomas Partsch
  • Start date Start date
T

Thomas Partsch

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
 
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
 
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
 
Back
Top