Click here to Skip to main content
15,887,821 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
what is exact use of instance modes in wcf
Posted
Comments
[no name] 3-May-14 8:20am    
When you conducted your research into instance modes in WCF, what did you find? What was unclear or confusing about your findings?

1 solution

we normally use PerCall when we want our service instances to be created and disposed off for each incoming request. this scenario is good in many ways when we want each client to have its own service instance and that instance is working on an exclusive thread. it does not mean multiple clients can not call the services at once. it only means each client will have its own copy of service instance. use PerCall for higher scalability and throughput.

single is like a singleton. only one instance is created to service all incoming requests from all the clients. concurrent calls can be made to singleton service just like PerCall but developer has the responsibility to manage concurrency and global state management. less scalable.

PerSession becomes PerCall if there binding is not sessionfull. PerSession maintains the session for each client channel given the sessionafull binding is used. PerSession is default service behavior.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900