Wednesday, December 14, 2011
WCF Interview Questions on Instancing Modes
Click here for all SQL Server Interview Questions
Click here for all WCF Interview Questions
Click here for all ASP.NET Interview Questions
Click here for all C# Interview Questions
Click here for Written Test or practical ASP.NET Interview Questions asked in MNC's
What are the instancing modes available in wcf?
1. Percall
2. PerSession
3. Single
What are the advantages of using Percall instancing mode in WCF?
In a Percall instance mode, a new service object is created for each call. The following are the advantages and Disadvantages of Percall instance mode.
Advantages:
Less memory consumption
Service instances are freed
Concurrency is not an issue
PerCall services increase overall throughput
Disadvantages:
State not maintained between calls
What are the four session types available in WCF?
Transport session
Reliable sessions
Secure sessions
Application sessions
What are the advantages and disadvantages of using PerSession instancing mode in WCF?
A new service object gets created for each client/proxy. The following are the advantages and Disadvantages of PerSession instance mode.
Advantages:
State maintained by service instance
Disadvantages:
Less throughput, greater memory consumption
Concurrency issues for multithreaded clients
Name a few bindings that can support PerSession instancing mode?
1. NetTcpBinding
2. NetNamedPipeBinding
3. WSHttpBinding
4. WSFederationHttpBinding
5. WSDualHttpBinding
What is the default Application Session timeout in WCF?
Session lifetime lasts 10 minutes by default, for Application Session.
What are the advantages and disadvantages of using Single, Instancing mode in WCF?
In a single instancing mode, a single service object is created for all calls from all clients and sessions This type of wcf service is also called as singleton service. The following are the advantages and Disadvantages of Single instance mode.
Advantages:
State maintained by service instance
Disadvantages:
Least throughput
Potentially greater memory consumption
Concurrency issues
What are the general guidelines for choosing an instancing mode?
In general, for scalability and throughput, prefer to use PerCall services where ever possible. Use PerSession services only when necessary, but keep in mind the overhead of sessions and session timeouts. Try to avoid singletons almost always.Singleton services, could be useful on client machines for shared functionality. These are only general guidelines, and your selection depends on what you are trying to achieve.
Click here for all SQL Server Interview Questions
Click here for all WCF Interview Questions
Click here for all ASP.NET Interview Questions
Click here for all C# Interview Questions
Click here for Written Test or practical ASP.NET Interview Questions asked in MNC's
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
If you are aware of any other WCF questions asked in an interview, please post them below. If you find anything missing or wrong, please feel free to correct by submitting the form below.