Wrong Error-Events when monitoring WCF Server-Application

Document ID : KB000009061
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

Sporadically wrong Error-Events when monitoring WCF Server-Application

When the application is working fine it reports the correct error message:

good.jpg

But sometimes when the Agent is enabled the application error message is reported incorrectly as below (highlighted in blue): "Could not send Message"

 bad.jpg

Environment:
.NET Agent
Cause:

The problem is related to a conflict with the .NETAgent WCFRuntimeTracing.  

 

Resolution:

You have 2 possible solutions:

a) Disable WCFRuntimeTracing in webservices.pbd as below, the .NET Agent won’t insert correlation ID into WCF/SOAP message headers:

#TurnOn: WCFRuntimeTracing

You need to restart the .NET application

b) Switch from WCF/SOAP header insertion to use HTTP header for correlation ID insertion.

You can enable HTTP correlation tracers in webservices.pbd as below:

- uncomment

TurnOn: ClientCorrelationTracing 

- comment

#TurnOn: WCFRuntimeTracing

 

Additional Information:

From APM documentation > Configure Correlated Tracing section:

"Cross-process transaction tracing requires the agent to insert a correlation identifier that can be passed from one process to another. The agent can insert this correlation identifier into either a SOAP or HTTP header. 

Because most services use SOAP messaging, the correlation identifiers are inserted and read from SOAP headers by default. In certain situations, however, you may prefer to pass the correlation identifier using HTTP headers. For example, in rare cases, adding the correlation identifier to the SOAP header can cause the message to be rejected because the correlation ID changes the SOAP payload. 

Depending on how your applications process SOAP messages and how you have implemented security, you can choose whether to pass the correlation ID in the HTTP header or the SOAP header ..  "