views:

50

answers:

2

Is there any event which allows me to get informed when a client accesses any of the listening WCF service methods ?

A: 

Using the various WCF extensibility points, you should be able to do this, for sure.

One way would be to use a dispatch message inspector that would inspect any message coming in. One of the attributes on that message will be the SOAP action, e.g. more or less the method to be called on your service.

Check out Kirk Evans' blog post on creating a simple WCF message inspector - should give you an idea how to hook into the necessary extension points.

Another example is an article on CodeProject about an IP filter, also implemented as an dispatch message inspector.

Hope those samples give you an idea where and how to start!

Marc

marc_s
A: 

Do you want to be programmatically "informed" or do you just want instrumentation? As for instrumentation: there are loads of performance counters and the sys. diag. log.

Alex

Alex
programmatically
dr. evil