PC Review


Reply
Thread Tools Rate Thread

adding a listener in app.config

 
 
MR
Guest
Posts: n/a
 
      2nd Dec 2007
i am trying to add a listener to my application in the config file. The
documentation says to add it as following:

<system.diagnostics>
<trace autoflush="true" indentsize="0">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener, system,
version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
initializeData="myListener.log" />
</listeners>
</trace>


when i add this to my app.config file, "initializeData" is underlined and
the error says: the "initializeData" attribute is not declared

why do i get this error? i don't see any other way to add a text trace file.
how id this supposed to work?

thanks
m

 
Reply With Quote
 
 
 
 
Michael Nemtsev
Guest
Posts: n/a
 
      3rd Dec 2007
But does in work or not?
Not allways what is underlines considered wrong
maybe your intellisence xsd is just damaged

--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog: http://spaces.live.com/laflour



"MR" wrote:

> i am trying to add a listener to my application in the config file. The
> documentation says to add it as following:
>
> <system.diagnostics>
> <trace autoflush="true" indentsize="0">
> <listeners>
> <add name="myListener"
> type="System.Diagnostics.TextWriterTraceListener, system,
> version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
> initializeData="myListener.log" />
> </listeners>
> </trace>
>
>
> when i add this to my app.config file, "initializeData" is underlined and
> the error says: the "initializeData" attribute is not declared
>
> why do i get this error? i don't see any other way to add a text trace file.
> how id this supposed to work?
>
> thanks
> m
>

 
Reply With Quote
 
MR
Guest
Posts: n/a
 
      3rd Dec 2007
no it does not work. i get a runtime error.

"Michael Nemtsev" <(E-Mail Removed)> wrote in message
news:FA782FC6-02A8-4D53-9716-(E-Mail Removed)...
> But does in work or not?
> Not allways what is underlines considered wrong
> maybe your intellisence xsd is just damaged
>
> --
> WBR, Michael Nemtsev [.NET/C# MVP].
> Blog: http://spaces.live.com/laflour
>
>
>
> "MR" wrote:
>
>> i am trying to add a listener to my application in the config file. The
>> documentation says to add it as following:
>>
>> <system.diagnostics>
>> <trace autoflush="true" indentsize="0">
>> <listeners>
>> <add name="myListener"
>> type="System.Diagnostics.TextWriterTraceListener, system,
>> version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>> initializeData="myListener.log" />
>> </listeners>
>> </trace>
>>
>>
>> when i add this to my app.config file, "initializeData" is underlined and
>> the error says: the "initializeData" attribute is not declared
>>
>> why do i get this error? i don't see any other way to add a text trace
>> file.
>> how id this supposed to work?
>>
>> thanks
>> m
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding property to the app config file Sharon Microsoft C# .NET 10 4th Jan 2010 03:10 AM
Error while adding a sql and a AD prvider in web.config siddharthkhare@hotmail.com Microsoft ASP .NET 3 18th Dec 2008 02:25 PM
Adding httphandler in Web.config file Valli Microsoft ASP .NET 0 10th Oct 2007 01:15 PM
adding smtpClient to web.config =?Utf-8?B?dGhlV2l6YXJkMQ==?= Microsoft ASP .NET 6 20th Apr 2006 07:31 PM
Custom Trace Listener & .exe.config =?Utf-8?B?R2VvcHNhcm9z?= Microsoft Dot NET 8 23rd Nov 2004 03:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:44 AM.