Skip to content
Documentation
Updated 6 minutes to read
Markdown
Release Notes

How to enable the WCF Diagnostics Tracing Feature

Section titled “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.

Repeat the steps as required to enable logging for multiple WCF applications.

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.

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

  • PickupFolder - Folder where to write the WCF Diagnostics output files, for example C:\Temp\Nodinite.LogAgent.WCFDiagnostics42.
  • LogAgentId - The unique LogAgentId, see Log Agents for additional details, for example 42.
  • DefaultMessageType - Default Message Type 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)
  • 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
<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:

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

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

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.

<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>

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

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

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

Step 9: Configure Search Field Expressions

Section titled “ 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.

Step 10: Configure Non-Events Monitoring (Optional)

Section titled “ 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.

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.


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

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...