What is the lifecycle of an IIS-hosted (http) WCF service? -
I have a dependency injection container setup in my application and I am thinking that whenever WCF service requests are disabled in Is going to be.
Can anyone explain to me, hosted an http / IIS WCF service, what is the lifecycle of the service? If I can understand it, then I can make an educated decision on where the container is stored, immediately, destroyed, etc.
If your instancecontextmode
is percall , the service The class will be created from scratch for each incoming request, and after that its work will be executed.
If your InstantNext Modes
is per session , the service class will be created and a customer will have a session duration (or an "inactivity timeout < P>
If your InstanceContextMode
is Single (Singleton), then the service class will be created when the first request will be in and will remain in memory unless the requests Do not come in, unless there is no error and there is no inactivity. Then, you have it!
per session
and single
Services) will also come in to make things even more "interesting".
Comments
Post a Comment