Install WCF applications

Windows Communication Foundation (WCF) is a framework for building service-oriented applications. New Relic's .NET agent can monitor both self-hosted and IIS-hosted WCF services, to give you a more complete view of your application stack. New Relic collects standard transaction data and WCF service request parameters from each WCF transaction.

Full WCF app installation is available in versions or higher of the .NET agent. Earlier .NET Framework versions support only IIS-hosted WCF applications, and only in ASP.NET Compatibility Mode.

IIS-hosted WCF

To install IIS-hosted WCF apps and ensure that IIS-hosted WCf apps will be instrumented automatically:

  1. Install the newest .NET agent.
  2. Ensure you give each WCF app a descriptive name.
  3. Enable or disable ASP.NET Compatibility Mode depending on which type of events you want to be instrumented:

    ASP.NET Compatibility Mode enabled

    When ASP.NET Compatibility Mode is enabled, the .NET agent instruments ASP.NET pipeline events as well as WCF events. In this mode, the agent provides you with a full view of your application stack.

    ASP.NET Compatibility Mode disabled

    When ASP.NET Compatibility Mode is disabled, the .NET agent only instruments WCF events. Any activity that occurs as part of the ASP.NET pipeline will not be captured, such as agent API calls that are made outside of a WCF transaction. In addition, cross application traces are not supported when ASP.NET Compatibility Mode is disabled.

Self-hosted WCF

While many WCF applications are hosted in IIS, WCF applications can also be hosted as a custom Windows Service, a console app, or a Windows Forms app. To instrument self-hosted WCF applications, see Non-IIS apps installation.

Cross application traces are not supported for self-hosted WCF applications.

Collect service request parameters

You can collect the WCF service request parameters attached to each service method. Whenever a service method is called, WCF transmits the service request as a method name with attached parameters. The .NET agent can collect the parameters attached to these service requests to better understand an individual transaction trace.

The instrumentation of parameter names is disabled by default, because parameters can contain sensitive information like passwords or usernames. However, you can ignore sensitive fields by specifying them in ignore elements. To enable parameter groups, see serviceRequestParameters.

For more help

Additional documentation resources include:

Recommendations for learning more: