I am trying to use the network listeners in an application and have the following app.config section which was copied from an example that has bee referenced in several other questions. The problem is that I get an error in the editor on the line that has tracemode="includehex". It says that tracemode is not declared. I ge the same error if I add the maxdatasize parameter. If I remove the tracemode and maxdatasize parms, the app runs and the listeners work, I just need to use the tracemode option to set it to "protocalonly". I've seen other questions on this which point to a blog at
http://blogs.msdn.com/dgorti/archive/2005/09/18/471003.aspx which I have read but it didn't address this issue. I sure hope someone has a clue because its driving me nuts.
This is not the complete app.config file but it is the section for thelisteners.
<system.diagnostics>
<trace autoflush="true" />
<sources>
<source name="System.Net" tracemode="includehex">
<listeners>
<add name="MyTraceFile"/>
</listeners>
</source>
<!-- This section defines the logging configuration for My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch"
>
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the Application Event Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="System.Net" value="Verbose" />
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add
name="MyTraceFile"
type="System.Diagnostics.T
extWriterT
raceListen
er"
initializeData="c:\temp\Sy
stemNetTra
ce.log"
/>
<add name="FileLog"
type="Microsoft.VisualBasi
c.Logging.
FileLogTra
ceListener
, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d
50a3a, processorArchitecture=MSIL
"
initializeData="FileLogWri
ter"/>
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
<!--<add name="EventLog" type="System.Diagnostics.E
ventLogTra
ceListener
" initializeData="APPLICATIO
N_NAME"/> -->
</sharedListeners>
</system.diagnostics>