Singleton Service
The singleton service is the ultimate sharable service. When you configure a service as a singleton, all clients are independently connected to the same single well-known instance context and implicitly to the same instance inside, regardless of which endpoint of the service they connect to. The singleton is created exactly once, when the host is created, and lives forever: it is disposed of only when the host shuts down.
Note
A singleton hosted in IIS or the WAS is created when you launch the host process (only when the first request to any service in that process is made). However, when using the auto-start feature of Windows Server AppFabric, the singleton will be instantiated once the machine starts up. To maintain the semantic of the singleton, use either self-hosting or Windows Server AppFabric with auto-start.
Using a singleton does not require clients to maintain a logical session with the singleton instance, or to use a binding that supports a transport-level session. If the contract the client consumes has a session, during the call the singleton will have the same session ID as the client (binding permitting), but closing the client proxy will terminate only the transport session, not the singleton context and the instance inside. If the singleton service supports contracts without a session, those contracts will not be per-call: they too will be connected to the same instance. By its very nature, the singleton is shared, and each client should simply create ...