question

Friederike T. avatar image
Friederike T. asked ·

WCF Calls via NetTCP

One of our customers is monitoring an application with IIS and .Net Agents which is using WCF Calls (via netTCP) for requesting backend applications.

We are seeing two strange behaviors:

1. One of the backend applications contains IIS and .Net Agents as well (same System Profile). The developer is wondering why the PurePaths skips the IIS of the backend application and it seems like the two .Net App-Pools are communicating directly. Is this the normal behavior in case of netTCP?

2. The second thing we are wondering about is another backend application which is not instrumented but also called via WCF . We do not see anything like outgoing calls to the backend in the transaction flow. We would expect to see these WCF calls like any other outgoing calls (SQL, Messaging, WebRequests..).

Has anybody experience with WCF in the PurePath? Do we need to adapt sensor settings to make these calls visible?

agentdotnetsensor
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Christian S. avatar image
Christian S. answered ·

hi Friederike,

in addition to what Andy said:

1. correct, the IIS agent only captures HTTP traffic. and I'm pretty sure that this TCP based communication is going directly to the .NET runtime and not via IIS. I'm no IIS expert, but I would be surprised, if the IIS web server would be able to handle other traffic than HTTP at all.

2. I'm pretty sure that the problem here is the dynatrace handling of WCF calls. we detect those as "remoting calls" and right now we only handle "web requests", "web services" and "messaging" as external calls out-of-the-box (database, too, but that's another topic :-)). however, if you want to work around this, then you could add an "external API service call" to those client-side WCF calls by placing a custom sensor on those and declaring it as external call in the method rule properties (also see here: https://community.dynatrace.com/community/display/...)

HTH,

Christian

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

We added a custom sensor and set the flag for external API call. It worked perfectly! Thank you for your help.

0 Likes 0 · ·
Carlos S. avatar image
Carlos S. answered ·

Hi Friederike,

I usually find the following .Net classes involved in WCF communications:

System.ServiceModel.Channels.ServiceChannel

System.ServiceModel.Dispatcher.SyncMethodInvoker

There are also ServiceChannel Proxies involved, from the ServiceChannel Class (API=.NET WCF)

.Net agents can show you that information and calls, IF the right apps are instrumented you would see these classes, do you have any application pools which you have not instrumented?

You would not need to create customer sensors to pick up such calls based in my experience.

Hope this helps, Carlos.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Andreas G. avatar image
Andreas G. answered ·

Hi

Two interesting scenarios. I will check with the team but here is my first response

#1: could be that the TCP/IP calls are directly done by ASP.NET without being proxied to IIS - kind of makes sense for me as ASP.NET will open the listeners and will not use IIS as a frontend web server. But - I might be wrong. Thats why I want to double check

#2: you are right. we should see these calls. I just got a different question with a stored session where we saw all outgoing WCF calls without any problems. They should show up as WCF Remoting Nodes. Do you see anything in the Auto Sensors that indicates these external calls? Maybe we just dont instrument the correct methods

Also - which .NET Version do you run?

Andi

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

It should be .Net 4.0 . Currently we are in the clarification with development to identify the methods that should do some remote calls.

0 Likes 0 · ·