I have developed a VB.NET WCF service that recives and sends back data. When the first client connects it starts the data output that continues also if the client is closed. If a new client connects then a new object is created and the data output starts at the begninning and continues in parallel with the old instance. Is there a way to read the same service object from multiple clients?
The service is self-hosted.
Thanks
UPDATE: I solved the problem adding the following bit of code to the service class:
<ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Multiple, InstanceContextMode:=InstanceContextMode.Single)> _
To use the ServiceHost overload that takes in the SingletonInstance, the service must be tagged with the appropriate ServiceBehaviours.