System.Diagnostics.Trace listener not working

  • Thread starter Thread starter J055
  • Start date Start date
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
 
Hello Andrew,

We have migrated the managed MSDN Subscriber newsgroup support to MSDN
Forum. So to get support on the issue, would you mind reposting it in the
MSDN BCL forum using the same MSDN subscriber account,
http://social.msdn.microsoft.com/forums/en-US/netfxbcl/threads/
And we will have dedicated support engineer to support the issue there.

You can get more information about the Priority Subscriber Support from the
homepage,
http://msdn.microsoft.com/en-us/subscriptions/aa974230.aspx


Best regards,
Ji Zhou
MSDN Subscriber Support in Forum
 
Back
Top