How to implement Diagnostics Trace features in Whidbey

M

Mukund Patel

Hi Friends,

I am working on asp.net in .net studio 2005 (Whidbey). I want to write trace
in file in my web application. How to implement Diagnostics Trace features
in Whidbey. I have written following code in web.config. But it says
System.Diagnostics is not a valid child element.

<system.diagnostics>
<trace autoflush="true">

<listeners>

<add name="WebPageTraceListener" type="System.Web.WebPageTraceListener,
System.Web, Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>

<add name="TestTracer" type="System.Diagnostics.TextWriterTraceListener,
System, Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
initializeData="samplewebapp\Asptesttrace.log" />

</listeners>

</trace>

</system.diagnostics>

Should I configure machine.config? How to configure it?.

Thanks

-Mukund
 
J

John Saunders

Mukund Patel said:
Hi Friends,

I am working on asp.net in .net studio 2005 (Whidbey). I want to write
trace
in file in my web application. How to implement Diagnostics Trace features
in Whidbey. I have written following code in web.config. But it says
System.Diagnostics is not a valid child element.

<system.diagnostics>

Where did you place this within web.config? It needs to be a child element
of the <configuration> element.

John Saunders
 

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,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top