How does the life cycle looks like for the following :
- WCF Webservice(http)
If I got this correct the service will be created for every call?
- WCF netTCP (also hosted in IIS) as singleton
Is it correct thtat the WCF service will be created on the first call and then never go down? Or will it go down when there is no connections for a while? And if so, where do I set this timeout? The service in my case is keeping state for the client so what will happen if a client connects but is idle so long that it excedes the timeout?
For the 1) the service will be created on every client call
2) 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.
By its very nature, the singleton is shared, and each client should simply create its own proxy or proxies to it.