---
title: Configure WCF Diagnostics Tracing | Nodinite
description: Learn how to configure and enable the Nodinite WCF Diagnostics tracing feature that provides end to end tracking including your WCF Applications.
---

:ReleaseNotes(https://portal.nodinite.com/marketplace/18):

# How to enable the WCF Diagnostics Tracing Feature

Learn how to enable WCF Diagnostics to enable Logging with :Nodinite:. To enable WCF Diagnostics logging, follow the steps below.

>First, make sure you comply with the [prerequisites][Prerequisites for Pickup Service].

>[!IMPORTANT]
>**Configure [Message Types][] for business intelligence**
>
>When configuring [WCF Diagnostics Tracing][], you must set **DefaultMessageType** and **MessageTypeFromBody** properties to enable [Message Types][]. Without Message Types:
>
>* [Search Field Expressions][] cannot extract business data (Order IDs, Customer Numbers, Invoice Numbers)
>* [Log Views][] cannot provide self-service search by business-critical data
>* [Non-Events Monitoring][] cannot track message volumes or detect missing transactions
>* [Business Process Modeling (BPM)][] cannot correlate transactions across systems
>
>Follow the steps below to configure these critical properties in your WCF application's config file.

## Enable Logging

> :fa-repeat: Repeat the steps as required to enable logging for **multiple** WCF applications.

### :fa-forward-step: Step 1: Copy files from ZIP

If you already performed this step during the installation, then go to the next step. Otherwise, copy the files from the ZIP package, and make sure Windows does not block them.

### :fa-forward-step: Step 2: Edit configuration section

Open your web/app.config and add/modify the `<system.diagnostics>` section as detailed below:

>[!NOTE]
>The :Nodinite: [Pickup Log Events Service Logging Agent][Pickup Service] consumes the output files. Make sure to set the **PickupFolder** and the **LogAgentId** property to identify logging into the :Nodinite: [Log API][].

#### Required Properties

* :fa-folder: **PickupFolder** - Folder where to write the WCF Diagnostics output files, for example ```C:\Temp\Nodinite.LogAgent.WCFDiagnostics42```.  
* :fa-fingerprint: **LogAgentId** - The unique LogAgentId, see [Log Agents][] for additional details, for example ```42```.
  
#### Critical for Business Intelligence

* :fa-envelope: **DefaultMessageType** - Default [Message Type][Message Types] for all WCF messages. Set to a meaningful business transaction name (e.g., `"OrderService#1.0"`, `"CustomerAPI#2.0"`). This enables [Search Field Expressions][] to extract business data. If MessageTypeFromBody = true, this is used as fallback when extraction fails. Default: `"IM.LogAgent.WCFDiagnostics/1.0#DefaultMessageType"` (not recommended - use a business-meaningful name instead)
* :fa-file-lines: **MessageTypeFromBody** - When `true`, automatically extracts Message Type from WCF message body using [XPath][] `/MessageLogTraceRecord/Envelope/Body` (namespace#node). Useful when WCF applications handle multiple message types. Falls back to DefaultMessageType if extraction fails. Default: `false`

>[!TIP]
>
>
>* **Single WCF service handling one message type**: Set DefaultMessageType to your business transaction name (e.g., "OrderService#1.0") and leave MessageTypeFromBody = false
>* **WCF service handling multiple message types**: Set MessageTypeFromBody = true and provide a meaningful DefaultMessageType as fallback (e.g., "GenericWCFService#1.0")
>
>After configuration, define [Message Types][] in Nodinite Administration and configure [Search Field Expressions][] to extract business data.

```xml
<system.diagnostics>
  <sources>
    <source name="System.ServiceModel" switchValue="Information, ActivityTracing">
      <listeners>
        <add name="Nodinite.LogAgent.WCFDiagnostics" />
      </listeners>
    </source>
    <source name="System.ServiceModel.MessageLogging" switchValue="Information, ActivityTracing">
      <listeners>
        <add name="Nodinite.LogAgent.WCFDiagnostics" />
      </listeners>
    </source>
  </sources>
  <sharedListeners>
    <add type="Nodinite.LogAgent.WCFDiagnostics.EventJsonWriterTraceListener, Nodinite.LogAgent.WCFDiagnostics" name="Nodinite.LogAgent.WCFDiagnostics" traceOutputOptions="None" PickupFolder="C:\Temp\Nodinite.LogAgent.WCFDiagnostics42" LogAgentId="42" DefaultMessageType="" MessageTypeFromBody="true" DefaultEndPointName="" DefaultEndPointUri="" IncomingEventTimeout="10">
      <filter type="" />
    </add>
  </sharedListeners>
  <trace autoflush="true" />
</system.diagnostics>
```

\* **name** - should not be changed. If you do change it you need to replace all occurrences:  

### :fa-forward-step: Step 3: Edit system.serviceModel section

Open your web/app.config and add/modify <system.serviceModel> section.

```xml
<diagnostics>
  <messageLogging
    logEntireMessage="true"
    logMalformedMessages="true"
    logMessagesAtServiceLevel="true"
    logMessagesAtTransportLevel="true"
    maxMessagesToLog="100000000"
    maxSizeOfMessageToLog="536870912"
  />
</diagnostics>
```

### :fa-forward-step: Step 4: Configure Newtonsoft version

Make sure to set the correct version of the Newtonsoft dll in the attribute newVersion, 9.0.0.0 is default with the downloaded version.
Open your web/app.config and add/modify `<configuration>` section.

```xml
<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="9.0.0.0" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>
```

### :fa-forward-step: Step 5: Save

>[!NOTE]
>Make sure to save changes when done.

### :fa-forward-step: Step 6: Configure Pickup Service

Now install and configure the :Nodinite: [Pickup Log Events Service Logging Agent][Pickup Service] to fetch log files from the **PickupFolder** and log to the :Nodinite: [Log API][]:

* [Prerequisites for Pickup Service][]

### :fa-forward-step: Step 7: Configure Log Views

Now [Add or manage Log Views][Add or manage Log View] and use the [Log Views][] to view the WCF Diagnostic output.

### :fa-forward-step: Step 8: Configure Message Types

Define [Message Types][] in Nodinite Administration that correspond to your DefaultMessageType configuration:

1. Navigate to **Administration** > **Log Management** > **Message Types**
2. Create a new Message Type matching your DefaultMessageType (e.g., "OrderService#1.0")
3. Set the Message Type name to match the namespace and root element of your WCF messages
4. Provide a meaningful description for business users

>[!NOTE]
>Message Types are mandatory for enabling Search Field extraction. Without Message Types, you cannot configure Search Field Expressions to extract business data from WCF messages.

### :fa-forward-step: Step 9: Configure Search Field Expressions

Configure [Search Field Expressions][] to extract business-critical data from your WCF messages:

1. Navigate to **Administration** > **Log Management** > **Search Fields**
2. Create Search Field Expressions for your Message Type using:
   * **XPath** - For XML WCF messages (e.g., `/Order/OrderId`, `/Customer/CustomerNumber`)
   * [JSON Path][] - For JSON WCF messages (e.g., `$.order.orderId`, `$.customer.customerNumber`)
   * **RegEx** - For text-based WCF messages or complex patterns
3. Test expressions against sample WCF messages
4. Assign expressions to appropriate Message Types

This enables business users to search WCF logs by Order IDs, Customer Numbers, Invoice Numbers, and other business-critical data.

### :fa-forward-step: Step 10: Configure Non-Events Monitoring (Optional)

Set up [Non-Events Monitoring][] to detect missing WCF transactions or data outages:

1. Navigate to **Administration** > **Log Management** > **Non-Events Monitoring**
2. Create monitoring rules for your WCF Message Types
3. Define expected message volumes and time windows
4. Configure alerts using [Alarm Plugins][]

This proactively alerts you when WCF messages are missing or volumes drop unexpectedly.

### :fa-forward-step: Step 11: Design BPM Processes (Optional)

Use [Business Process Modeling (BPM)][] to correlate WCF transactions end-to-end across your applications and systems:

1. Navigate to **Administration** > **BPM**
2. Design business process flows that include your WCF services
3. Define correlation rules using Search Fields (Order IDs, Transaction IDs, etc.)
4. Map WCF Message Types to process steps
5. Enable end-to-end transaction tracking

This provides complete visibility into business transactions flowing through your WCF applications and other systems.

___

## :fa-hand-point-right: Next Steps

Complete these steps to unlock business intelligence for your WCF applications:

1. [Message Types][] – Define business transaction types in Nodinite Administration (Critical first step)
2. [Search Field Expressions][] – Configure extraction of business data from WCF messages
3. [Log Views][] – Create views for self-service access to WCF diagnostic data
4. [Non-Events Monitoring][] (Optional) – Set up alerts for missing WCF transactions
5. [Business Process Modeling (BPM)][] (Optional) – Design end-to-end transaction flows

## :fa-link-horizontal: Related Topics

* :fa-tags: [Message Types][] (Mandatory) - Define business transaction types for Search Field extraction  
* :fa-search-dollar: [Search Field Expressions][] - Extract business data from WCF messages using XPath, JSON Path, or [RegEx][]  
* :fa-eye: [Log Views][] - Manage user access to WCF diagnostic data with role-based security  
* :fa-chart-line: [Non-Events Monitoring][] - Track message volumes and detect data outages in WCF applications  
* :fa-project-diagram: [Business Process Modeling (BPM)][] - Correlate transactions end-to-end across systems  
* :fa-bell: [Alarm Plugins][] - Configure alerts for Non-Events and other monitoring scenarios  
* :fa-truck-pickup: [Pickup Log Events Service Logging Agent][Pickup Service] - Fetches WCF trace files asynchronously  
* :fa-box-archive: [Log Agents][] - Manage **Log Agents**  
* :fa-hard-drive: [Log][] - Log Management overview  

[Add or manage Log View]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/Add%20or%20Manage%20Log%20View.md
[Alarm Plugins]:{ndr}/Administration/5.%20Settings/1.%20Alarm%20Plugins/Features/What%20is%20an%20Alarm%20Plugin.md
[Business Process Modeling (BPM)]:{ndr}/Repository%20Model/BPMs/Overview.md
[JSON Path]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/JSON%20Path.md
[Log]:{ndr}/Administration/1.%20Log%20Management/Overview.md
[Log Agents]:{ndr}/Administration/1.%20Log%20Management/3.%20Log%20Agents/Features/What%20is%20a%20Log%20Agent.md
[Log API]:{ndr}/Core%20Services/Log%20API/Overview.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Non-Events Monitoring]:{ndr}/Logging%20and%20Monitoring/Non-Events/Overview.md
[Pickup Service]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Overview.md
[Prerequisites for Pickup Service]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Getting%20started/1.%20Prerequisites.md
[RegEx]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Extract/regex.md
[Search Field Expressions]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/What%20is%20a%20Search%20Field.md
[WCF Diagnostics Tracing]:{ndr}/Logging%20and%20Monitoring/WCF%20Diagnostics%20Tracing/Overview.md
[XPath]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Extract/xPath.md