WCF Tutorial
Lección 109 de 236 · Part 36 Instancing modes in WCF · Bases de datos
Part 36 Instancing modes in WCF
Link for code samples used in the demo
http://csharp-video-tutorials.blogspot.com/2014/02/part-36-instancing-modes-in-wcf_25.html
Link for all dot net and sql server video tutorial playlists
http://www.youtube.com/user/kudvenkat/playlists
In this video we will discuss, different instancing modes available in WCF. Instancing modes are also called as instance context modes.
Instance context mode dictates, how long the service instance remains on the server.
There are 3 instancing modes
1. PerCall – A new instance of service object is created for every request, irrespective of whether the request comes from the same client or a different client.
2. PerSession – A new instance of the service object is created for each new client session and maintained for the duration of that session.
3. Single – A single instance of the service object is created and handles all requests for the lifetime of the application, irrespective of whether the request comes from the same client or a different client.
How do you specify what instancing mode you want to use?
Use ServiceBehavior attribute and specify InstanceContextMode.
In our next video, we will discuss each instancing option and their implications with an example.