How to get the number of exception the service has encountered in WCF?
How will I be able to count the number of exceptions thrown 开发者_运维技巧during the execution of a service? Right now I'm using behaviors to hook with the dispatchers using IOperationInvoker and IParameterInspector. But I need to know how can i count the faults and exceptions that occurs in a particular operation or the total occurrence in the whole service.
A couple of approaches exist. You can use tracing (and inspect your log files); through instrumentation, that is, use performance counters to monitor faults on services or operations.
A nice way of achieving service monitoring is also available through AppFabric, if this is available to you.
HTH
精彩评论