Could you please tell me, how to handle the creation and destruction service contracts handling object working on PerSession basis?
For example, when client connects for the first time, handling object on server is created and I need to put this object to internal list and to notify server internal objects, that client has been just connected. When for example, client connection is aborted forcefully (for example, connection problems from client side), I guess WCF should finalize object, that was handling client requests. But I need to notify some server objects about client has disconnected and remove the client from internal list before finalizing.
Can here standard procedure (constructor(), Finalize()) be used? Finalize is not very good here, because garbager collection can take place long after the client has been disconnected. Is there any other solution?