Doing some research, I've come across the System.Diagnost ics tools. I have
set up my application to write to a textfile, c:\listener.log , but while the
file was automatically created, I am not able to write to the file.
code...
web.config:
<system.diagnos tics>
<switches>
<add name="tracewebf orms" value="1" />
<add name="tracebusi nesslogic" value="1" />
</switches>
<trace autoflush="true " >
<listeners>
<add name="ImplicitL istener"
type="System.Di agnostics.TextW riterTraceListe ner, System,
Version=1.0.330 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
initializeData= "c:\TraceListen er.log"/>
<remove name="Default" />
</listeners>
</trace>
</system.diagnost ics>
<compilation defaultLanguage ="c#" debug="true">
<compilers>
<compiler
language="C#;Cs harp"
extension=".cs"
type="Microsoft .CSharp.CSharpC odeProvider, System, Version=1.0.330 0.0,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
compilerOptions ="/d:TRACE" />
</compilers>
</compilation>
Page_load event of webform:
System.Diagnost ics.Trace.Write LineIf(Global.w ebformsSwitch.E nabled,"Trace
From WebForms");
What could prevent the WriteLineIf from actually writing to the file?
--
[[((hillarie))]]
To reply, remove ".SPAMBLOCK " from email address
"H Branyan" <hb************ ****@merc.merce r.edu> wrote in message
news:bn******** ****@ID-92475.news.uni-berlin.de...
In the Application_OnS tart event in global.asax, my code calls an
AlertService which creates a System.Timers.T imer() object. So this
service doesn't actually run in conjunction with a specific aspx page, apparently.
When the timer's Elapsed event handler fires, it calls some other classes
I have written. These classes output some Trace statements that you can
view if an aspx page calls them, but I can't seem to figure out where the Trace
statements go when my service calls the classes.
Is there any way I can find the trace for this service?