Home > How-to Guides > How to do a network trace in .NET client-side app (ActiveSend / OWA Desktop)

How to do a network trace in .NET client-side app (ActiveSend / OWA Desktop)

This article applies to the following products:

  • Messageware ActiveSend
  • Messageware OWA Desktop

STEPS

  1. Add the following to the bottom of the .exe’s config file (e.g. OwaDesktop.exe.config)

        Just inside of the final closing </configuration> tag.

  1. Ensure the process has write permissions to the file path, and cannot use expandable environment strings like %appdata%
  2. Restart the process.

 

  <system.diagnostics>

    <sources>

      <source name="System.Net" tracemode="includehex" maxdatasize="1024">

        <listeners>

          <add name="System.Net"/>

        </listeners>

      </source>

      <source name="System.Net.Cache">

        <listeners>

          <add name="System.Net"/>

        </listeners>

      </source>

      <source name="System.Net.Http">

        <listeners>

          <add name="System.Net"/>

        </listeners>

      </source>

      <source name="System.Net.Sockets">

        <listeners>

          <add name="System.Net"/>

        </listeners>

      </source>

      <source name="System.Net.WebSockets">

        <listeners>

          <add name="System.Net"/>

        </listeners>

      </source>

   </sources>

    <switches>

      <add name="System.Net" value="Verbose"/>

      <add name="System.Net.Cache" value="Verbose"/>

      <add name="System.Net.Http" value="Verbose"/>

      <add name="System.Net.Sockets" value="Verbose"/>

      <add name="System.Net.WebSockets" value="Verbose"/>

    </switches>

    <sharedListeners>

      <add name="System.Net"

        type="System.Diagnostics.TextWriterTraceListener"

        initializeData="C:\Users\brianc\AppData\Roaming\Messageware\OWADesktop\logs\network.log"

        traceOutputOptions="ProcessId, DateTime"

      />

    </sharedListeners>

    <trace autoflush="true"/>

</system.diagnostics>