WCF Instance Management

WCF can control how WCF service objects are created on WCF server using Wcf Instance. There are three ways of WCF instance creation InstanceContextMode.

  • PerCall (default)
  • PerSession
  • Single


Create a new WCF instance on every WCF client call

public class MyService : IMyService

Ony one WCF instance is created for all the call from a WCF client session.

public class MyService : IMyService

NOTE:- If you doesn’t create Sessionful binding then PerSession will act as PerCall. As a result every request to the service creates a new instance of the service class. http://forums.silverlight.net/t/118971.aspx/1


Only one global WCF intance should be created for all WCF clients.

public class MyService : IMyService

Leave a comment

Filed under WCF

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s