Trace-Problem

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
 
M

Mike Placentra II

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
 
T

Thomas Partsch

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top