J
J055
Hi
I can't get the trace listener to work. I have a Website project in VS2008
with the following web.config entries:
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="C:\Users\Public\Documents\TextWriterOutput.log"
/>
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp"
extension=".cs"
warningLevel="4"
compilerOptions="/d:TRACE"
type="Microsoft.CSharp.CSharpCodeProvider, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
This is the Default.aspx page load method:
protected void Page_Load(object sender, EventArgs e)
{
System.Diagnostics.Trace.WriteLine("Test");
}
The funny thing is that it did work then just stopped for no apparent
reason. I've restarted everything I can thing of which might make a
difference. I'm using Windows 2008 x64, VS2008 with latest patches etc.
Any ideas?
Thanks
Andrew
I can't get the trace listener to work. I have a Website project in VS2008
with the following web.config entries:
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="C:\Users\Public\Documents\TextWriterOutput.log"
/>
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp"
extension=".cs"
warningLevel="4"
compilerOptions="/d:TRACE"
type="Microsoft.CSharp.CSharpCodeProvider, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
This is the Default.aspx page load method:
protected void Page_Load(object sender, EventArgs e)
{
System.Diagnostics.Trace.WriteLine("Test");
}
The funny thing is that it did work then just stopped for no apparent
reason. I've restarted everything I can thing of which might make a
difference. I'm using Windows 2008 x64, VS2008 with latest patches etc.
Any ideas?
Thanks
Andrew