There are a number of issues with this.
First of all, the preferred way to call the WCF service is a model for each call, for example. your client will call the service method, which invokes the creation of the service class instance on the server, the corresponding method is executed, and then the service instance is deleted again. Thus, you cannot control client connections per se - they exist only for fractions of a second during a call.
In addition, there is not much infrastructure on the server side to monitor calls per second, etc., with the exception of performance counters. The new server add-on product, formerly known as Dublin (currently called AppFabric), should bring many improvements in this area (manageability) - see This MSDN for more information .
But even today, you might think about taking a service class and controlling the creation and destruction of this class. The service class also has a reference to ServiceHost , which created it using the OperationContext.Current.Host property, so that you can somehow tell the host that a new instance of the service class has been created. There, only goign is the only host object, so it can work, but it requires a well-designed and well-tested approach to multithreading in ServiceHost (you can create your own ServiceHost to achieve something similar).
This could be a step towards "monitoring my service." As for performance monitoring, why don't the dozens of WCF performance counters help you or provide you with the information you need?
source share