I've got a web service running, and i'm trying to build tracing into it that
is outputted to a file. Unfortunately, i can't find a way of enabling TRACE
token, and it just seems to skip over all System.Diagnost ics.Trace lines in
the debugger.
I don't want to use the ASP page trace dump, as it will break my SOAP
interface.
This code is called on my application start event:
Dim lstrFileStream As System.IO.FileS tream
Dim objTraceListene r As System.Diagnost ics.TraceListen er
'Create Stream and Listener
lstrFileStream = New System.IO.FileS tream("C:\Temp\ Tracer.Log",
IO.FileMode.Ope nOrCreate)
objTraceListene r = New
System.Diagnost ics.TextWriterT raceListener(ls trFileStream)
objTraceListene r.TraceOutputOp tions = Diagnostics.Tra ceOptions.Times tamp
'Trace Item
System.Diagnost ics.Trace.Liste ners.Add(objTra ceListener)
This is called at the start of one of the SOAP requests:
System.Diagnost ics.Trace.Write ("Add Account Called.")
System.Diagnost ics.Trace.Flush ()
This generates an empty file, and never writes anything too it.
While i am aware that this style of trace listener may not be ideal, i'd be
happy with it writing anything right now.
Any thoughts?
Cheers Chaps
Tris