There is a WCF service that runs in default PerSession

I work with her like this:

 using(var client=new WCFTest()) { client.dowork1() client.dowork2() } 

But subscribing to the event inside the WCF-service:

 void dowork1() { objClientHandle.Faulted += new EventHandler(this.ClientDisconnected); objClientHandle.Closed += new EventHandler(this.ClientDisconnected); } 

In theory, after the client disconnects, some action should take place. But I don’t fall into this event after going beyond using ...

Tell me what I missed?

  • So in using your client , and subscribing to objClientHandle events is objClientHandle two different objects. - andreycha

1 answer 1

The problem was basicHttpBinding. Replaced with wsHttpBinding and it all worked.