By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,967 Members | 1,625 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,967 IT Pros & Developers. It's quick & easy.

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

P: n/a
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_goss...19/405146.aspx

Thanks in advance.

Murugan G.
Jan 5 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.