views:

108

answers:

2

Hi all,

I'm new with WCF and I've deployed a web site with IIS7 that have 2 .svc files. On each svc files, there a service with some methods available through the interface.

What I would like is to know how many times each method is called and who calls each method. I would like if possible to have my custom monitoring then I can for example store this values in a DB, but without logging in the services.

Do you know how I can do that ?

Thanks in advance for your help.

A: 

Without logging on the services side you can't have this information. You may take a look at this article about logging in WCF.

Darin Dimitrov
A: 

You can turn on tracing in WCF as shown here. You don't need message logging. You can implement custom tracing that logs to a DB instead on a XML trace file.

In future the best bet is probably hosting the WCF service using the appfabric framework introduced in .Net 4.0 on Windows Server 2008 R2. Appfabric provides an IIS extension that can be configured to trace and log WCF calls to a SQL Server DB and have monitoring dashboard in IIS admin console. More information here.

Depending on needs you may turn on WCF performance counters as well.

Pratik