<system.diagnostics> causing a Configuration Error while setting Trace Listeners.

  • Thread starter msnews.microsoft.com
  • Start date
M

msnews.microsoft.com

Hi,

I am tring to use Trace Listener in asp.net 1.1 application as mentoned
here[1]. But i am getting the following error,
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: Exception in configuration section handler.

Source Error:

Line 99: </system.web>
Line 100:
Line 101: <system.diagnostics>
Line 102: <trace autoflush="true" indentsize="4">
Line 103: <listeners>

the error comes only at the first request, the subsequent request is not
causing this error, but the file also not created.

This is how my web.config looks now.
<configuration>
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="LogFileListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\MyTrace.txt" />
<remove type="System.Diagnostics.DefaultTraceListener" />
</listeners>
</trace>
</system.diagnostics>
</configuration>

I removed other elements for simplicity.

[1] http://blogs.technet.com/stefan_gossner/archive/2005/05/19/405146.aspx

Thanks in advance.

Murugan G.
 

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

Forum statistics

Threads
473,765
Messages
2,569,568
Members
45,042
Latest member
icassiem

Latest Threads

Top