Essential Windows Communication Foundation: For .NET Framework 3.5
by Steve Resnick, Richard Crane, Chris Bowen
5. Behaviors
BEHAVIORS ARE WCF CLASSES that affect runtime operation. Behaviors are invoked as the WCF runtime starts on the client and server and as messages flow between the two. Because behaviors run at these critical times, they are used to implement many built-in features in the WCF. They are also an important extensibility point for customizations.
For example, ServiceHost is responsible for defining the instancing and concurrency aspects of a server, in addition to dispatching messages to the proper operation. When a message is received by a service and dispatched to a certain method of a class, should ServiceHost create a new instance of that class for each request or should it reuse instances? And when ServiceHost calls the method on ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access